/*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.UserAck = (function() {

    /**
     * Properties of a UserAck.
     * @exports IUserAck
     * @interface IUserAck
     * @property {number|null} [id] UserAck id
     * @property {number|null} [activeScene] UserAck activeScene
     * @property {number|null} [activeRole] UserAck activeRole
     * @property {number|null} [activeSwim] UserAck activeSwim
     * @property {Array.<IItem>|null} [items] UserAck items
     * @property {number|null} [newGift] UserAck newGift
     * @property {Array.<ISevenLoginState>|null} [sevenLoginState] UserAck sevenLoginState
     * @property {number|null} [loginDays] UserAck loginDays
     * @property {number|null} [invite] UserAck invite
     * @property {number|null} [signInDay] UserAck signInDay
     * @property {number|null} [todaySignIn] UserAck todaySignIn
     * @property {number|null} [guide] UserAck guide
     * @property {number|null} ["switch"] UserAck switch
     * @property {number|null} [level] UserAck level
     * @property {number|null} [videoCount] UserAck videoCount
     * @property {number|null} [weekScore] UserAck weekScore
     */

    /**
     * Constructs a new UserAck.
     * @exports UserAck
     * @classdesc Represents a UserAck.
     * @implements IUserAck
     * @constructor
     * @param {IUserAck=} [properties] Properties to set
     */
    function UserAck(properties) {
        this.items = [];
        this.sevenLoginState = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * UserAck id.
     * @member {number} id
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.id = 0;

    /**
     * UserAck activeScene.
     * @member {number} activeScene
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.activeScene = 0;

    /**
     * UserAck activeRole.
     * @member {number} activeRole
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.activeRole = 0;

    /**
     * UserAck activeSwim.
     * @member {number} activeSwim
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.activeSwim = 0;

    /**
     * UserAck items.
     * @member {Array.<IItem>} items
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.items = $util.emptyArray;

    /**
     * UserAck newGift.
     * @member {number} newGift
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.newGift = 0;

    /**
     * UserAck sevenLoginState.
     * @member {Array.<ISevenLoginState>} sevenLoginState
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.sevenLoginState = $util.emptyArray;

    /**
     * UserAck loginDays.
     * @member {number} loginDays
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.loginDays = 0;

    /**
     * UserAck invite.
     * @member {number} invite
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.invite = 0;

    /**
     * UserAck signInDay.
     * @member {number} signInDay
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.signInDay = 0;

    /**
     * UserAck todaySignIn.
     * @member {number} todaySignIn
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.todaySignIn = 0;

    /**
     * UserAck guide.
     * @member {number} guide
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.guide = 0;

    /**
     * UserAck switch.
     * @member {number} switch
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype["switch"] = 0;

    /**
     * UserAck level.
     * @member {number} level
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.level = 0;

    /**
     * UserAck videoCount.
     * @member {number} videoCount
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.videoCount = 0;

    /**
     * UserAck weekScore.
     * @member {number} weekScore
     * @memberof UserAck
     * @instance
     */
    UserAck.prototype.weekScore = 0;

    /**
     * Creates a new UserAck instance using the specified properties.
     * @function create
     * @memberof UserAck
     * @static
     * @param {IUserAck=} [properties] Properties to set
     * @returns {UserAck} UserAck instance
     */
    UserAck.create = function create(properties) {
        return new UserAck(properties);
    };

    /**
     * Encodes the specified UserAck message. Does not implicitly {@link UserAck.verify|verify} messages.
     * @function encode
     * @memberof UserAck
     * @static
     * @param {IUserAck} message UserAck message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    UserAck.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.id != null && message.hasOwnProperty("id"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
        if (message.activeScene != null && message.hasOwnProperty("activeScene"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.activeScene);
        if (message.activeRole != null && message.hasOwnProperty("activeRole"))
            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.activeRole);
        if (message.activeSwim != null && message.hasOwnProperty("activeSwim"))
            writer.uint32(/* id 4, wireType 0 =*/32).int32(message.activeSwim);
        if (message.items != null && message.items.length)
            for (var i = 0; i < message.items.length; ++i)
                $root.Item.encode(message.items[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
        if (message.newGift != null && message.hasOwnProperty("newGift"))
            writer.uint32(/* id 6, wireType 0 =*/48).int32(message.newGift);
        if (message.sevenLoginState != null && message.sevenLoginState.length)
            for (var i = 0; i < message.sevenLoginState.length; ++i)
                $root.SevenLoginState.encode(message.sevenLoginState[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
        if (message.loginDays != null && message.hasOwnProperty("loginDays"))
            writer.uint32(/* id 8, wireType 0 =*/64).int32(message.loginDays);
        if (message.invite != null && message.hasOwnProperty("invite"))
            writer.uint32(/* id 9, wireType 0 =*/72).int32(message.invite);
        if (message.signInDay != null && message.hasOwnProperty("signInDay"))
            writer.uint32(/* id 10, wireType 0 =*/80).int32(message.signInDay);
        if (message.todaySignIn != null && message.hasOwnProperty("todaySignIn"))
            writer.uint32(/* id 11, wireType 0 =*/88).int32(message.todaySignIn);
        if (message.guide != null && message.hasOwnProperty("guide"))
            writer.uint32(/* id 12, wireType 0 =*/96).int32(message.guide);
        if (message["switch"] != null && message.hasOwnProperty("switch"))
            writer.uint32(/* id 13, wireType 0 =*/104).int32(message["switch"]);
        if (message.level != null && message.hasOwnProperty("level"))
            writer.uint32(/* id 14, wireType 0 =*/112).int32(message.level);
        if (message.videoCount != null && message.hasOwnProperty("videoCount"))
            writer.uint32(/* id 15, wireType 0 =*/120).int32(message.videoCount);
        if (message.weekScore != null && message.hasOwnProperty("weekScore"))
            writer.uint32(/* id 16, wireType 0 =*/128).int32(message.weekScore);
        return writer;
    };

    /**
     * Encodes the specified UserAck message, length delimited. Does not implicitly {@link UserAck.verify|verify} messages.
     * @function encodeDelimited
     * @memberof UserAck
     * @static
     * @param {IUserAck} message UserAck message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    UserAck.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a UserAck message from the specified reader or buffer.
     * @function decode
     * @memberof UserAck
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {UserAck} UserAck
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    UserAck.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserAck();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.id = reader.int32();
                break;
            case 2:
                message.activeScene = reader.int32();
                break;
            case 3:
                message.activeRole = reader.int32();
                break;
            case 4:
                message.activeSwim = reader.int32();
                break;
            case 5:
                if (!(message.items && message.items.length))
                    message.items = [];
                message.items.push($root.Item.decode(reader, reader.uint32()));
                break;
            case 6:
                message.newGift = reader.int32();
                break;
            case 7:
                if (!(message.sevenLoginState && message.sevenLoginState.length))
                    message.sevenLoginState = [];
                message.sevenLoginState.push($root.SevenLoginState.decode(reader, reader.uint32()));
                break;
            case 8:
                message.loginDays = reader.int32();
                break;
            case 9:
                message.invite = reader.int32();
                break;
            case 10:
                message.signInDay = reader.int32();
                break;
            case 11:
                message.todaySignIn = reader.int32();
                break;
            case 12:
                message.guide = reader.int32();
                break;
            case 13:
                message["switch"] = reader.int32();
                break;
            case 14:
                message.level = reader.int32();
                break;
            case 15:
                message.videoCount = reader.int32();
                break;
            case 16:
                message.weekScore = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a UserAck message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof UserAck
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {UserAck} UserAck
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    UserAck.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a UserAck message.
     * @function verify
     * @memberof UserAck
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    UserAck.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.id != null && message.hasOwnProperty("id"))
            if (!$util.isInteger(message.id))
                return "id: integer expected";
        if (message.activeScene != null && message.hasOwnProperty("activeScene"))
            if (!$util.isInteger(message.activeScene))
                return "activeScene: integer expected";
        if (message.activeRole != null && message.hasOwnProperty("activeRole"))
            if (!$util.isInteger(message.activeRole))
                return "activeRole: integer expected";
        if (message.activeSwim != null && message.hasOwnProperty("activeSwim"))
            if (!$util.isInteger(message.activeSwim))
                return "activeSwim: integer expected";
        if (message.items != null && message.hasOwnProperty("items")) {
            if (!Array.isArray(message.items))
                return "items: array expected";
            for (var i = 0; i < message.items.length; ++i) {
                var error = $root.Item.verify(message.items[i]);
                if (error)
                    return "items." + error;
            }
        }
        if (message.newGift != null && message.hasOwnProperty("newGift"))
            if (!$util.isInteger(message.newGift))
                return "newGift: integer expected";
        if (message.sevenLoginState != null && message.hasOwnProperty("sevenLoginState")) {
            if (!Array.isArray(message.sevenLoginState))
                return "sevenLoginState: array expected";
            for (var i = 0; i < message.sevenLoginState.length; ++i) {
                var error = $root.SevenLoginState.verify(message.sevenLoginState[i]);
                if (error)
                    return "sevenLoginState." + error;
            }
        }
        if (message.loginDays != null && message.hasOwnProperty("loginDays"))
            if (!$util.isInteger(message.loginDays))
                return "loginDays: integer expected";
        if (message.invite != null && message.hasOwnProperty("invite"))
            if (!$util.isInteger(message.invite))
                return "invite: integer expected";
        if (message.signInDay != null && message.hasOwnProperty("signInDay"))
            if (!$util.isInteger(message.signInDay))
                return "signInDay: integer expected";
        if (message.todaySignIn != null && message.hasOwnProperty("todaySignIn"))
            if (!$util.isInteger(message.todaySignIn))
                return "todaySignIn: integer expected";
        if (message.guide != null && message.hasOwnProperty("guide"))
            if (!$util.isInteger(message.guide))
                return "guide: integer expected";
        if (message["switch"] != null && message.hasOwnProperty("switch"))
            if (!$util.isInteger(message["switch"]))
                return "switch: integer expected";
        if (message.level != null && message.hasOwnProperty("level"))
            if (!$util.isInteger(message.level))
                return "level: integer expected";
        if (message.videoCount != null && message.hasOwnProperty("videoCount"))
            if (!$util.isInteger(message.videoCount))
                return "videoCount: integer expected";
        if (message.weekScore != null && message.hasOwnProperty("weekScore"))
            if (!$util.isInteger(message.weekScore))
                return "weekScore: integer expected";
        return null;
    };

    /**
     * Creates a UserAck message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof UserAck
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {UserAck} UserAck
     */
    UserAck.fromObject = function fromObject(object) {
        if (object instanceof $root.UserAck)
            return object;
        var message = new $root.UserAck();
        if (object.id != null)
            message.id = object.id | 0;
        if (object.activeScene != null)
            message.activeScene = object.activeScene | 0;
        if (object.activeRole != null)
            message.activeRole = object.activeRole | 0;
        if (object.activeSwim != null)
            message.activeSwim = object.activeSwim | 0;
        if (object.items) {
            if (!Array.isArray(object.items))
                throw TypeError(".UserAck.items: array expected");
            message.items = [];
            for (var i = 0; i < object.items.length; ++i) {
                if (typeof object.items[i] !== "object")
                    throw TypeError(".UserAck.items: object expected");
                message.items[i] = $root.Item.fromObject(object.items[i]);
            }
        }
        if (object.newGift != null)
            message.newGift = object.newGift | 0;
        if (object.sevenLoginState) {
            if (!Array.isArray(object.sevenLoginState))
                throw TypeError(".UserAck.sevenLoginState: array expected");
            message.sevenLoginState = [];
            for (var i = 0; i < object.sevenLoginState.length; ++i) {
                if (typeof object.sevenLoginState[i] !== "object")
                    throw TypeError(".UserAck.sevenLoginState: object expected");
                message.sevenLoginState[i] = $root.SevenLoginState.fromObject(object.sevenLoginState[i]);
            }
        }
        if (object.loginDays != null)
            message.loginDays = object.loginDays | 0;
        if (object.invite != null)
            message.invite = object.invite | 0;
        if (object.signInDay != null)
            message.signInDay = object.signInDay | 0;
        if (object.todaySignIn != null)
            message.todaySignIn = object.todaySignIn | 0;
        if (object.guide != null)
            message.guide = object.guide | 0;
        if (object["switch"] != null)
            message["switch"] = object["switch"] | 0;
        if (object.level != null)
            message.level = object.level | 0;
        if (object.videoCount != null)
            message.videoCount = object.videoCount | 0;
        if (object.weekScore != null)
            message.weekScore = object.weekScore | 0;
        return message;
    };

    /**
     * Creates a plain object from a UserAck message. Also converts values to other types if specified.
     * @function toObject
     * @memberof UserAck
     * @static
     * @param {UserAck} message UserAck
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    UserAck.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults) {
            object.items = [];
            object.sevenLoginState = [];
        }
        if (options.defaults) {
            object.id = 0;
            object.activeScene = 0;
            object.activeRole = 0;
            object.activeSwim = 0;
            object.newGift = 0;
            object.loginDays = 0;
            object.invite = 0;
            object.signInDay = 0;
            object.todaySignIn = 0;
            object.guide = 0;
            object["switch"] = 0;
            object.level = 0;
            object.videoCount = 0;
            object.weekScore = 0;
        }
        if (message.id != null && message.hasOwnProperty("id"))
            object.id = message.id;
        if (message.activeScene != null && message.hasOwnProperty("activeScene"))
            object.activeScene = message.activeScene;
        if (message.activeRole != null && message.hasOwnProperty("activeRole"))
            object.activeRole = message.activeRole;
        if (message.activeSwim != null && message.hasOwnProperty("activeSwim"))
            object.activeSwim = message.activeSwim;
        if (message.items && message.items.length) {
            object.items = [];
            for (var j = 0; j < message.items.length; ++j)
                object.items[j] = $root.Item.toObject(message.items[j], options);
        }
        if (message.newGift != null && message.hasOwnProperty("newGift"))
            object.newGift = message.newGift;
        if (message.sevenLoginState && message.sevenLoginState.length) {
            object.sevenLoginState = [];
            for (var j = 0; j < message.sevenLoginState.length; ++j)
                object.sevenLoginState[j] = $root.SevenLoginState.toObject(message.sevenLoginState[j], options);
        }
        if (message.loginDays != null && message.hasOwnProperty("loginDays"))
            object.loginDays = message.loginDays;
        if (message.invite != null && message.hasOwnProperty("invite"))
            object.invite = message.invite;
        if (message.signInDay != null && message.hasOwnProperty("signInDay"))
            object.signInDay = message.signInDay;
        if (message.todaySignIn != null && message.hasOwnProperty("todaySignIn"))
            object.todaySignIn = message.todaySignIn;
        if (message.guide != null && message.hasOwnProperty("guide"))
            object.guide = message.guide;
        if (message["switch"] != null && message.hasOwnProperty("switch"))
            object["switch"] = message["switch"];
        if (message.level != null && message.hasOwnProperty("level"))
            object.level = message.level;
        if (message.videoCount != null && message.hasOwnProperty("videoCount"))
            object.videoCount = message.videoCount;
        if (message.weekScore != null && message.hasOwnProperty("weekScore"))
            object.weekScore = message.weekScore;
        return object;
    };

    /**
     * Converts this UserAck to JSON.
     * @function toJSON
     * @memberof UserAck
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    UserAck.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return UserAck;
})();

$root.UserBasicInfo = (function() {

    /**
     * Properties of a UserBasicInfo.
     * @exports IUserBasicInfo
     * @interface IUserBasicInfo
     * @property {number|null} [uid] UserBasicInfo uid
     * @property {number|null} [area] UserBasicInfo area
     * @property {string|null} [openid] UserBasicInfo openid
     * @property {number|null} [inviteId] UserBasicInfo inviteId
     * @property {number|null} [inviteArea] UserBasicInfo inviteArea
     * @property {string|null} [nick] UserBasicInfo nick
     * @property {string|null} [headUrl] UserBasicInfo headUrl
     * @property {number|null} [channel] UserBasicInfo channel
     */

    /**
     * Constructs a new UserBasicInfo.
     * @exports UserBasicInfo
     * @classdesc Represents a UserBasicInfo.
     * @implements IUserBasicInfo
     * @constructor
     * @param {IUserBasicInfo=} [properties] Properties to set
     */
    function UserBasicInfo(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * UserBasicInfo uid.
     * @member {number} uid
     * @memberof UserBasicInfo
     * @instance
     */
    UserBasicInfo.prototype.uid = 0;

    /**
     * UserBasicInfo area.
     * @member {number} area
     * @memberof UserBasicInfo
     * @instance
     */
    UserBasicInfo.prototype.area = 0;

    /**
     * UserBasicInfo openid.
     * @member {string} openid
     * @memberof UserBasicInfo
     * @instance
     */
    UserBasicInfo.prototype.openid = "";

    /**
     * UserBasicInfo inviteId.
     * @member {number} inviteId
     * @memberof UserBasicInfo
     * @instance
     */
    UserBasicInfo.prototype.inviteId = 0;

    /**
     * UserBasicInfo inviteArea.
     * @member {number} inviteArea
     * @memberof UserBasicInfo
     * @instance
     */
    UserBasicInfo.prototype.inviteArea = 0;

    /**
     * UserBasicInfo nick.
     * @member {string} nick
     * @memberof UserBasicInfo
     * @instance
     */
    UserBasicInfo.prototype.nick = "";

    /**
     * UserBasicInfo headUrl.
     * @member {string} headUrl
     * @memberof UserBasicInfo
     * @instance
     */
    UserBasicInfo.prototype.headUrl = "";

    /**
     * UserBasicInfo channel.
     * @member {number} channel
     * @memberof UserBasicInfo
     * @instance
     */
    UserBasicInfo.prototype.channel = 0;

    /**
     * Creates a new UserBasicInfo instance using the specified properties.
     * @function create
     * @memberof UserBasicInfo
     * @static
     * @param {IUserBasicInfo=} [properties] Properties to set
     * @returns {UserBasicInfo} UserBasicInfo instance
     */
    UserBasicInfo.create = function create(properties) {
        return new UserBasicInfo(properties);
    };

    /**
     * Encodes the specified UserBasicInfo message. Does not implicitly {@link UserBasicInfo.verify|verify} messages.
     * @function encode
     * @memberof UserBasicInfo
     * @static
     * @param {IUserBasicInfo} message UserBasicInfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    UserBasicInfo.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.uid != null && message.hasOwnProperty("uid"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.uid);
        if (message.area != null && message.hasOwnProperty("area"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.area);
        if (message.openid != null && message.hasOwnProperty("openid"))
            writer.uint32(/* id 3, wireType 2 =*/26).string(message.openid);
        if (message.inviteId != null && message.hasOwnProperty("inviteId"))
            writer.uint32(/* id 4, wireType 0 =*/32).int32(message.inviteId);
        if (message.inviteArea != null && message.hasOwnProperty("inviteArea"))
            writer.uint32(/* id 5, wireType 0 =*/40).int32(message.inviteArea);
        if (message.nick != null && message.hasOwnProperty("nick"))
            writer.uint32(/* id 6, wireType 2 =*/50).string(message.nick);
        if (message.headUrl != null && message.hasOwnProperty("headUrl"))
            writer.uint32(/* id 7, wireType 2 =*/58).string(message.headUrl);
        if (message.channel != null && message.hasOwnProperty("channel"))
            writer.uint32(/* id 8, wireType 0 =*/64).int32(message.channel);
        return writer;
    };

    /**
     * Encodes the specified UserBasicInfo message, length delimited. Does not implicitly {@link UserBasicInfo.verify|verify} messages.
     * @function encodeDelimited
     * @memberof UserBasicInfo
     * @static
     * @param {IUserBasicInfo} message UserBasicInfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    UserBasicInfo.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a UserBasicInfo message from the specified reader or buffer.
     * @function decode
     * @memberof UserBasicInfo
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {UserBasicInfo} UserBasicInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    UserBasicInfo.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UserBasicInfo();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.uid = reader.int32();
                break;
            case 2:
                message.area = reader.int32();
                break;
            case 3:
                message.openid = reader.string();
                break;
            case 4:
                message.inviteId = reader.int32();
                break;
            case 5:
                message.inviteArea = reader.int32();
                break;
            case 6:
                message.nick = reader.string();
                break;
            case 7:
                message.headUrl = reader.string();
                break;
            case 8:
                message.channel = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a UserBasicInfo message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof UserBasicInfo
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {UserBasicInfo} UserBasicInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    UserBasicInfo.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a UserBasicInfo message.
     * @function verify
     * @memberof UserBasicInfo
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    UserBasicInfo.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.uid != null && message.hasOwnProperty("uid"))
            if (!$util.isInteger(message.uid))
                return "uid: integer expected";
        if (message.area != null && message.hasOwnProperty("area"))
            if (!$util.isInteger(message.area))
                return "area: integer expected";
        if (message.openid != null && message.hasOwnProperty("openid"))
            if (!$util.isString(message.openid))
                return "openid: string expected";
        if (message.inviteId != null && message.hasOwnProperty("inviteId"))
            if (!$util.isInteger(message.inviteId))
                return "inviteId: integer expected";
        if (message.inviteArea != null && message.hasOwnProperty("inviteArea"))
            if (!$util.isInteger(message.inviteArea))
                return "inviteArea: integer expected";
        if (message.nick != null && message.hasOwnProperty("nick"))
            if (!$util.isString(message.nick))
                return "nick: string expected";
        if (message.headUrl != null && message.hasOwnProperty("headUrl"))
            if (!$util.isString(message.headUrl))
                return "headUrl: string expected";
        if (message.channel != null && message.hasOwnProperty("channel"))
            if (!$util.isInteger(message.channel))
                return "channel: integer expected";
        return null;
    };

    /**
     * Creates a UserBasicInfo message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof UserBasicInfo
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {UserBasicInfo} UserBasicInfo
     */
    UserBasicInfo.fromObject = function fromObject(object) {
        if (object instanceof $root.UserBasicInfo)
            return object;
        var message = new $root.UserBasicInfo();
        if (object.uid != null)
            message.uid = object.uid | 0;
        if (object.area != null)
            message.area = object.area | 0;
        if (object.openid != null)
            message.openid = String(object.openid);
        if (object.inviteId != null)
            message.inviteId = object.inviteId | 0;
        if (object.inviteArea != null)
            message.inviteArea = object.inviteArea | 0;
        if (object.nick != null)
            message.nick = String(object.nick);
        if (object.headUrl != null)
            message.headUrl = String(object.headUrl);
        if (object.channel != null)
            message.channel = object.channel | 0;
        return message;
    };

    /**
     * Creates a plain object from a UserBasicInfo message. Also converts values to other types if specified.
     * @function toObject
     * @memberof UserBasicInfo
     * @static
     * @param {UserBasicInfo} message UserBasicInfo
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    UserBasicInfo.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.uid = 0;
            object.area = 0;
            object.openid = "";
            object.inviteId = 0;
            object.inviteArea = 0;
            object.nick = "";
            object.headUrl = "";
            object.channel = 0;
        }
        if (message.uid != null && message.hasOwnProperty("uid"))
            object.uid = message.uid;
        if (message.area != null && message.hasOwnProperty("area"))
            object.area = message.area;
        if (message.openid != null && message.hasOwnProperty("openid"))
            object.openid = message.openid;
        if (message.inviteId != null && message.hasOwnProperty("inviteId"))
            object.inviteId = message.inviteId;
        if (message.inviteArea != null && message.hasOwnProperty("inviteArea"))
            object.inviteArea = message.inviteArea;
        if (message.nick != null && message.hasOwnProperty("nick"))
            object.nick = message.nick;
        if (message.headUrl != null && message.hasOwnProperty("headUrl"))
            object.headUrl = message.headUrl;
        if (message.channel != null && message.hasOwnProperty("channel"))
            object.channel = message.channel;
        return object;
    };

    /**
     * Converts this UserBasicInfo to JSON.
     * @function toJSON
     * @memberof UserBasicInfo
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    UserBasicInfo.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return UserBasicInfo;
})();

$root.Share = (function() {

    /**
     * Properties of a Share.
     * @exports IShare
     * @interface IShare
     * @property {number|null} [type] Share type
     * @property {number|null} [reward] Share reward
     */

    /**
     * Constructs a new Share.
     * @exports Share
     * @classdesc Represents a Share.
     * @implements IShare
     * @constructor
     * @param {IShare=} [properties] Properties to set
     */
    function Share(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Share type.
     * @member {number} type
     * @memberof Share
     * @instance
     */
    Share.prototype.type = 0;

    /**
     * Share reward.
     * @member {number} reward
     * @memberof Share
     * @instance
     */
    Share.prototype.reward = 0;

    /**
     * Creates a new Share instance using the specified properties.
     * @function create
     * @memberof Share
     * @static
     * @param {IShare=} [properties] Properties to set
     * @returns {Share} Share instance
     */
    Share.create = function create(properties) {
        return new Share(properties);
    };

    /**
     * Encodes the specified Share message. Does not implicitly {@link Share.verify|verify} messages.
     * @function encode
     * @memberof Share
     * @static
     * @param {IShare} message Share message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Share.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.type != null && message.hasOwnProperty("type"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
        if (message.reward != null && message.hasOwnProperty("reward"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.reward);
        return writer;
    };

    /**
     * Encodes the specified Share message, length delimited. Does not implicitly {@link Share.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Share
     * @static
     * @param {IShare} message Share message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Share.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a Share message from the specified reader or buffer.
     * @function decode
     * @memberof Share
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Share} Share
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Share.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Share();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.type = reader.int32();
                break;
            case 2:
                message.reward = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a Share message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Share
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Share} Share
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Share.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a Share message.
     * @function verify
     * @memberof Share
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Share.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.type != null && message.hasOwnProperty("type"))
            if (!$util.isInteger(message.type))
                return "type: integer expected";
        if (message.reward != null && message.hasOwnProperty("reward"))
            if (!$util.isInteger(message.reward))
                return "reward: integer expected";
        return null;
    };

    /**
     * Creates a Share message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Share
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Share} Share
     */
    Share.fromObject = function fromObject(object) {
        if (object instanceof $root.Share)
            return object;
        var message = new $root.Share();
        if (object.type != null)
            message.type = object.type | 0;
        if (object.reward != null)
            message.reward = object.reward | 0;
        return message;
    };

    /**
     * Creates a plain object from a Share message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Share
     * @static
     * @param {Share} message Share
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Share.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.type = 0;
            object.reward = 0;
        }
        if (message.type != null && message.hasOwnProperty("type"))
            object.type = message.type;
        if (message.reward != null && message.hasOwnProperty("reward"))
            object.reward = message.reward;
        return object;
    };

    /**
     * Converts this Share to JSON.
     * @function toJSON
     * @memberof Share
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Share.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return Share;
})();

$root.ChooseArea = (function() {

    /**
     * Properties of a ChooseArea.
     * @exports IChooseArea
     * @interface IChooseArea
     * @property {number|null} [id] ChooseArea id
     */

    /**
     * Constructs a new ChooseArea.
     * @exports ChooseArea
     * @classdesc Represents a ChooseArea.
     * @implements IChooseArea
     * @constructor
     * @param {IChooseArea=} [properties] Properties to set
     */
    function ChooseArea(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * ChooseArea id.
     * @member {number} id
     * @memberof ChooseArea
     * @instance
     */
    ChooseArea.prototype.id = 0;

    /**
     * Creates a new ChooseArea instance using the specified properties.
     * @function create
     * @memberof ChooseArea
     * @static
     * @param {IChooseArea=} [properties] Properties to set
     * @returns {ChooseArea} ChooseArea instance
     */
    ChooseArea.create = function create(properties) {
        return new ChooseArea(properties);
    };

    /**
     * Encodes the specified ChooseArea message. Does not implicitly {@link ChooseArea.verify|verify} messages.
     * @function encode
     * @memberof ChooseArea
     * @static
     * @param {IChooseArea} message ChooseArea message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ChooseArea.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.id != null && message.hasOwnProperty("id"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
        return writer;
    };

    /**
     * Encodes the specified ChooseArea message, length delimited. Does not implicitly {@link ChooseArea.verify|verify} messages.
     * @function encodeDelimited
     * @memberof ChooseArea
     * @static
     * @param {IChooseArea} message ChooseArea message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ChooseArea.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a ChooseArea message from the specified reader or buffer.
     * @function decode
     * @memberof ChooseArea
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {ChooseArea} ChooseArea
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ChooseArea.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ChooseArea();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.id = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a ChooseArea message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof ChooseArea
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {ChooseArea} ChooseArea
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ChooseArea.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a ChooseArea message.
     * @function verify
     * @memberof ChooseArea
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    ChooseArea.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.id != null && message.hasOwnProperty("id"))
            if (!$util.isInteger(message.id))
                return "id: integer expected";
        return null;
    };

    /**
     * Creates a ChooseArea message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof ChooseArea
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {ChooseArea} ChooseArea
     */
    ChooseArea.fromObject = function fromObject(object) {
        if (object instanceof $root.ChooseArea)
            return object;
        var message = new $root.ChooseArea();
        if (object.id != null)
            message.id = object.id | 0;
        return message;
    };

    /**
     * Creates a plain object from a ChooseArea message. Also converts values to other types if specified.
     * @function toObject
     * @memberof ChooseArea
     * @static
     * @param {ChooseArea} message ChooseArea
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    ChooseArea.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.id = 0;
        if (message.id != null && message.hasOwnProperty("id"))
            object.id = message.id;
        return object;
    };

    /**
     * Converts this ChooseArea to JSON.
     * @function toJSON
     * @memberof ChooseArea
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    ChooseArea.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return ChooseArea;
})();

$root.SignReq = (function() {

    /**
     * Properties of a SignReq.
     * @exports ISignReq
     * @interface ISignReq
     */

    /**
     * Constructs a new SignReq.
     * @exports SignReq
     * @classdesc Represents a SignReq.
     * @implements ISignReq
     * @constructor
     * @param {ISignReq=} [properties] Properties to set
     */
    function SignReq(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Creates a new SignReq instance using the specified properties.
     * @function create
     * @memberof SignReq
     * @static
     * @param {ISignReq=} [properties] Properties to set
     * @returns {SignReq} SignReq instance
     */
    SignReq.create = function create(properties) {
        return new SignReq(properties);
    };

    /**
     * Encodes the specified SignReq message. Does not implicitly {@link SignReq.verify|verify} messages.
     * @function encode
     * @memberof SignReq
     * @static
     * @param {ISignReq} message SignReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    SignReq.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        return writer;
    };

    /**
     * Encodes the specified SignReq message, length delimited. Does not implicitly {@link SignReq.verify|verify} messages.
     * @function encodeDelimited
     * @memberof SignReq
     * @static
     * @param {ISignReq} message SignReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    SignReq.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a SignReq message from the specified reader or buffer.
     * @function decode
     * @memberof SignReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {SignReq} SignReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    SignReq.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SignReq();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a SignReq message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof SignReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {SignReq} SignReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    SignReq.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a SignReq message.
     * @function verify
     * @memberof SignReq
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    SignReq.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        return null;
    };

    /**
     * Creates a SignReq message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof SignReq
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {SignReq} SignReq
     */
    SignReq.fromObject = function fromObject(object) {
        if (object instanceof $root.SignReq)
            return object;
        return new $root.SignReq();
    };

    /**
     * Creates a plain object from a SignReq message. Also converts values to other types if specified.
     * @function toObject
     * @memberof SignReq
     * @static
     * @param {SignReq} message SignReq
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    SignReq.toObject = function toObject() {
        return {};
    };

    /**
     * Converts this SignReq to JSON.
     * @function toJSON
     * @memberof SignReq
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    SignReq.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return SignReq;
})();

$root.ChangeSkin = (function() {

    /**
     * Properties of a ChangeSkin.
     * @exports IChangeSkin
     * @interface IChangeSkin
     * @property {number|null} [type] ChangeSkin type
     * @property {number|null} [id] ChangeSkin id
     */

    /**
     * Constructs a new ChangeSkin.
     * @exports ChangeSkin
     * @classdesc Represents a ChangeSkin.
     * @implements IChangeSkin
     * @constructor
     * @param {IChangeSkin=} [properties] Properties to set
     */
    function ChangeSkin(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * ChangeSkin type.
     * @member {number} type
     * @memberof ChangeSkin
     * @instance
     */
    ChangeSkin.prototype.type = 0;

    /**
     * ChangeSkin id.
     * @member {number} id
     * @memberof ChangeSkin
     * @instance
     */
    ChangeSkin.prototype.id = 0;

    /**
     * Creates a new ChangeSkin instance using the specified properties.
     * @function create
     * @memberof ChangeSkin
     * @static
     * @param {IChangeSkin=} [properties] Properties to set
     * @returns {ChangeSkin} ChangeSkin instance
     */
    ChangeSkin.create = function create(properties) {
        return new ChangeSkin(properties);
    };

    /**
     * Encodes the specified ChangeSkin message. Does not implicitly {@link ChangeSkin.verify|verify} messages.
     * @function encode
     * @memberof ChangeSkin
     * @static
     * @param {IChangeSkin} message ChangeSkin message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ChangeSkin.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.type != null && message.hasOwnProperty("type"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
        if (message.id != null && message.hasOwnProperty("id"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.id);
        return writer;
    };

    /**
     * Encodes the specified ChangeSkin message, length delimited. Does not implicitly {@link ChangeSkin.verify|verify} messages.
     * @function encodeDelimited
     * @memberof ChangeSkin
     * @static
     * @param {IChangeSkin} message ChangeSkin message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ChangeSkin.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a ChangeSkin message from the specified reader or buffer.
     * @function decode
     * @memberof ChangeSkin
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {ChangeSkin} ChangeSkin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ChangeSkin.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ChangeSkin();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.type = reader.int32();
                break;
            case 2:
                message.id = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a ChangeSkin message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof ChangeSkin
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {ChangeSkin} ChangeSkin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ChangeSkin.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a ChangeSkin message.
     * @function verify
     * @memberof ChangeSkin
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    ChangeSkin.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.type != null && message.hasOwnProperty("type"))
            if (!$util.isInteger(message.type))
                return "type: integer expected";
        if (message.id != null && message.hasOwnProperty("id"))
            if (!$util.isInteger(message.id))
                return "id: integer expected";
        return null;
    };

    /**
     * Creates a ChangeSkin message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof ChangeSkin
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {ChangeSkin} ChangeSkin
     */
    ChangeSkin.fromObject = function fromObject(object) {
        if (object instanceof $root.ChangeSkin)
            return object;
        var message = new $root.ChangeSkin();
        if (object.type != null)
            message.type = object.type | 0;
        if (object.id != null)
            message.id = object.id | 0;
        return message;
    };

    /**
     * Creates a plain object from a ChangeSkin message. Also converts values to other types if specified.
     * @function toObject
     * @memberof ChangeSkin
     * @static
     * @param {ChangeSkin} message ChangeSkin
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    ChangeSkin.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.type = 0;
            object.id = 0;
        }
        if (message.type != null && message.hasOwnProperty("type"))
            object.type = message.type;
        if (message.id != null && message.hasOwnProperty("id"))
            object.id = message.id;
        return object;
    };

    /**
     * Converts this ChangeSkin to JSON.
     * @function toJSON
     * @memberof ChangeSkin
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    ChangeSkin.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return ChangeSkin;
})();

$root.SevenLoginState = (function() {

    /**
     * Properties of a SevenLoginState.
     * @exports ISevenLoginState
     * @interface ISevenLoginState
     * @property {number|null} [day] SevenLoginState day
     * @property {number|null} [flag] SevenLoginState flag
     */

    /**
     * Constructs a new SevenLoginState.
     * @exports SevenLoginState
     * @classdesc Represents a SevenLoginState.
     * @implements ISevenLoginState
     * @constructor
     * @param {ISevenLoginState=} [properties] Properties to set
     */
    function SevenLoginState(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * SevenLoginState day.
     * @member {number} day
     * @memberof SevenLoginState
     * @instance
     */
    SevenLoginState.prototype.day = 0;

    /**
     * SevenLoginState flag.
     * @member {number} flag
     * @memberof SevenLoginState
     * @instance
     */
    SevenLoginState.prototype.flag = 0;

    /**
     * Creates a new SevenLoginState instance using the specified properties.
     * @function create
     * @memberof SevenLoginState
     * @static
     * @param {ISevenLoginState=} [properties] Properties to set
     * @returns {SevenLoginState} SevenLoginState instance
     */
    SevenLoginState.create = function create(properties) {
        return new SevenLoginState(properties);
    };

    /**
     * Encodes the specified SevenLoginState message. Does not implicitly {@link SevenLoginState.verify|verify} messages.
     * @function encode
     * @memberof SevenLoginState
     * @static
     * @param {ISevenLoginState} message SevenLoginState message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    SevenLoginState.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.day != null && message.hasOwnProperty("day"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.day);
        if (message.flag != null && message.hasOwnProperty("flag"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.flag);
        return writer;
    };

    /**
     * Encodes the specified SevenLoginState message, length delimited. Does not implicitly {@link SevenLoginState.verify|verify} messages.
     * @function encodeDelimited
     * @memberof SevenLoginState
     * @static
     * @param {ISevenLoginState} message SevenLoginState message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    SevenLoginState.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a SevenLoginState message from the specified reader or buffer.
     * @function decode
     * @memberof SevenLoginState
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {SevenLoginState} SevenLoginState
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    SevenLoginState.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SevenLoginState();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.day = reader.int32();
                break;
            case 2:
                message.flag = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a SevenLoginState message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof SevenLoginState
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {SevenLoginState} SevenLoginState
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    SevenLoginState.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a SevenLoginState message.
     * @function verify
     * @memberof SevenLoginState
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    SevenLoginState.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.day != null && message.hasOwnProperty("day"))
            if (!$util.isInteger(message.day))
                return "day: integer expected";
        if (message.flag != null && message.hasOwnProperty("flag"))
            if (!$util.isInteger(message.flag))
                return "flag: integer expected";
        return null;
    };

    /**
     * Creates a SevenLoginState message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof SevenLoginState
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {SevenLoginState} SevenLoginState
     */
    SevenLoginState.fromObject = function fromObject(object) {
        if (object instanceof $root.SevenLoginState)
            return object;
        var message = new $root.SevenLoginState();
        if (object.day != null)
            message.day = object.day | 0;
        if (object.flag != null)
            message.flag = object.flag | 0;
        return message;
    };

    /**
     * Creates a plain object from a SevenLoginState message. Also converts values to other types if specified.
     * @function toObject
     * @memberof SevenLoginState
     * @static
     * @param {SevenLoginState} message SevenLoginState
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    SevenLoginState.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.day = 0;
            object.flag = 0;
        }
        if (message.day != null && message.hasOwnProperty("day"))
            object.day = message.day;
        if (message.flag != null && message.hasOwnProperty("flag"))
            object.flag = message.flag;
        return object;
    };

    /**
     * Converts this SevenLoginState to JSON.
     * @function toJSON
     * @memberof SevenLoginState
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    SevenLoginState.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return SevenLoginState;
})();

$root.SevenLogin = (function() {

    /**
     * Properties of a SevenLogin.
     * @exports ISevenLogin
     * @interface ISevenLogin
     */

    /**
     * Constructs a new SevenLogin.
     * @exports SevenLogin
     * @classdesc Represents a SevenLogin.
     * @implements ISevenLogin
     * @constructor
     * @param {ISevenLogin=} [properties] Properties to set
     */
    function SevenLogin(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Creates a new SevenLogin instance using the specified properties.
     * @function create
     * @memberof SevenLogin
     * @static
     * @param {ISevenLogin=} [properties] Properties to set
     * @returns {SevenLogin} SevenLogin instance
     */
    SevenLogin.create = function create(properties) {
        return new SevenLogin(properties);
    };

    /**
     * Encodes the specified SevenLogin message. Does not implicitly {@link SevenLogin.verify|verify} messages.
     * @function encode
     * @memberof SevenLogin
     * @static
     * @param {ISevenLogin} message SevenLogin message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    SevenLogin.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        return writer;
    };

    /**
     * Encodes the specified SevenLogin message, length delimited. Does not implicitly {@link SevenLogin.verify|verify} messages.
     * @function encodeDelimited
     * @memberof SevenLogin
     * @static
     * @param {ISevenLogin} message SevenLogin message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    SevenLogin.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a SevenLogin message from the specified reader or buffer.
     * @function decode
     * @memberof SevenLogin
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {SevenLogin} SevenLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    SevenLogin.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SevenLogin();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a SevenLogin message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof SevenLogin
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {SevenLogin} SevenLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    SevenLogin.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a SevenLogin message.
     * @function verify
     * @memberof SevenLogin
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    SevenLogin.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        return null;
    };

    /**
     * Creates a SevenLogin message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof SevenLogin
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {SevenLogin} SevenLogin
     */
    SevenLogin.fromObject = function fromObject(object) {
        if (object instanceof $root.SevenLogin)
            return object;
        return new $root.SevenLogin();
    };

    /**
     * Creates a plain object from a SevenLogin message. Also converts values to other types if specified.
     * @function toObject
     * @memberof SevenLogin
     * @static
     * @param {SevenLogin} message SevenLogin
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    SevenLogin.toObject = function toObject() {
        return {};
    };

    /**
     * Converts this SevenLogin to JSON.
     * @function toJSON
     * @memberof SevenLogin
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    SevenLogin.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return SevenLogin;
})();

$root.RookieGiftReq = (function() {

    /**
     * Properties of a RookieGiftReq.
     * @exports IRookieGiftReq
     * @interface IRookieGiftReq
     */

    /**
     * Constructs a new RookieGiftReq.
     * @exports RookieGiftReq
     * @classdesc Represents a RookieGiftReq.
     * @implements IRookieGiftReq
     * @constructor
     * @param {IRookieGiftReq=} [properties] Properties to set
     */
    function RookieGiftReq(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Creates a new RookieGiftReq instance using the specified properties.
     * @function create
     * @memberof RookieGiftReq
     * @static
     * @param {IRookieGiftReq=} [properties] Properties to set
     * @returns {RookieGiftReq} RookieGiftReq instance
     */
    RookieGiftReq.create = function create(properties) {
        return new RookieGiftReq(properties);
    };

    /**
     * Encodes the specified RookieGiftReq message. Does not implicitly {@link RookieGiftReq.verify|verify} messages.
     * @function encode
     * @memberof RookieGiftReq
     * @static
     * @param {IRookieGiftReq} message RookieGiftReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RookieGiftReq.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        return writer;
    };

    /**
     * Encodes the specified RookieGiftReq message, length delimited. Does not implicitly {@link RookieGiftReq.verify|verify} messages.
     * @function encodeDelimited
     * @memberof RookieGiftReq
     * @static
     * @param {IRookieGiftReq} message RookieGiftReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RookieGiftReq.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a RookieGiftReq message from the specified reader or buffer.
     * @function decode
     * @memberof RookieGiftReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {RookieGiftReq} RookieGiftReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RookieGiftReq.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RookieGiftReq();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a RookieGiftReq message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof RookieGiftReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {RookieGiftReq} RookieGiftReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RookieGiftReq.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a RookieGiftReq message.
     * @function verify
     * @memberof RookieGiftReq
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    RookieGiftReq.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        return null;
    };

    /**
     * Creates a RookieGiftReq message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof RookieGiftReq
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {RookieGiftReq} RookieGiftReq
     */
    RookieGiftReq.fromObject = function fromObject(object) {
        if (object instanceof $root.RookieGiftReq)
            return object;
        return new $root.RookieGiftReq();
    };

    /**
     * Creates a plain object from a RookieGiftReq message. Also converts values to other types if specified.
     * @function toObject
     * @memberof RookieGiftReq
     * @static
     * @param {RookieGiftReq} message RookieGiftReq
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    RookieGiftReq.toObject = function toObject() {
        return {};
    };

    /**
     * Converts this RookieGiftReq to JSON.
     * @function toJSON
     * @memberof RookieGiftReq
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    RookieGiftReq.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return RookieGiftReq;
})();

$root.Item = (function() {

    /**
     * Properties of an Item.
     * @exports IItem
     * @interface IItem
     * @property {number|null} [cid] Item cid
     * @property {number|null} [num] Item num
     */

    /**
     * Constructs a new Item.
     * @exports Item
     * @classdesc Represents an Item.
     * @implements IItem
     * @constructor
     * @param {IItem=} [properties] Properties to set
     */
    function Item(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Item cid.
     * @member {number} cid
     * @memberof Item
     * @instance
     */
    Item.prototype.cid = 0;

    /**
     * Item num.
     * @member {number} num
     * @memberof Item
     * @instance
     */
    Item.prototype.num = 0;

    /**
     * Creates a new Item instance using the specified properties.
     * @function create
     * @memberof Item
     * @static
     * @param {IItem=} [properties] Properties to set
     * @returns {Item} Item instance
     */
    Item.create = function create(properties) {
        return new Item(properties);
    };

    /**
     * Encodes the specified Item message. Does not implicitly {@link Item.verify|verify} messages.
     * @function encode
     * @memberof Item
     * @static
     * @param {IItem} message Item message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Item.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.cid != null && message.hasOwnProperty("cid"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cid);
        if (message.num != null && message.hasOwnProperty("num"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.num);
        return writer;
    };

    /**
     * Encodes the specified Item message, length delimited. Does not implicitly {@link Item.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Item
     * @static
     * @param {IItem} message Item message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Item.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an Item message from the specified reader or buffer.
     * @function decode
     * @memberof Item
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Item} Item
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Item.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Item();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.cid = reader.int32();
                break;
            case 2:
                message.num = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an Item message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Item
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Item} Item
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Item.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an Item message.
     * @function verify
     * @memberof Item
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Item.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.cid != null && message.hasOwnProperty("cid"))
            if (!$util.isInteger(message.cid))
                return "cid: integer expected";
        if (message.num != null && message.hasOwnProperty("num"))
            if (!$util.isInteger(message.num))
                return "num: integer expected";
        return null;
    };

    /**
     * Creates an Item message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Item
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Item} Item
     */
    Item.fromObject = function fromObject(object) {
        if (object instanceof $root.Item)
            return object;
        var message = new $root.Item();
        if (object.cid != null)
            message.cid = object.cid | 0;
        if (object.num != null)
            message.num = object.num | 0;
        return message;
    };

    /**
     * Creates a plain object from an Item message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Item
     * @static
     * @param {Item} message Item
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Item.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.cid = 0;
            object.num = 0;
        }
        if (message.cid != null && message.hasOwnProperty("cid"))
            object.cid = message.cid;
        if (message.num != null && message.hasOwnProperty("num"))
            object.num = message.num;
        return object;
    };

    /**
     * Converts this Item to JSON.
     * @function toJSON
     * @memberof Item
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Item.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return Item;
})();

$root.ItemOp = (function() {

    /**
     * Properties of an ItemOp.
     * @exports IItemOp
     * @interface IItemOp
     * @property {number|null} [type] ItemOp type
     * @property {IItem|null} [item] ItemOp item
     */

    /**
     * Constructs a new ItemOp.
     * @exports ItemOp
     * @classdesc Represents an ItemOp.
     * @implements IItemOp
     * @constructor
     * @param {IItemOp=} [properties] Properties to set
     */
    function ItemOp(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * ItemOp type.
     * @member {number} type
     * @memberof ItemOp
     * @instance
     */
    ItemOp.prototype.type = 0;

    /**
     * ItemOp item.
     * @member {IItem|null|undefined} item
     * @memberof ItemOp
     * @instance
     */
    ItemOp.prototype.item = null;

    /**
     * Creates a new ItemOp instance using the specified properties.
     * @function create
     * @memberof ItemOp
     * @static
     * @param {IItemOp=} [properties] Properties to set
     * @returns {ItemOp} ItemOp instance
     */
    ItemOp.create = function create(properties) {
        return new ItemOp(properties);
    };

    /**
     * Encodes the specified ItemOp message. Does not implicitly {@link ItemOp.verify|verify} messages.
     * @function encode
     * @memberof ItemOp
     * @static
     * @param {IItemOp} message ItemOp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ItemOp.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.type != null && message.hasOwnProperty("type"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
        if (message.item != null && message.hasOwnProperty("item"))
            $root.Item.encode(message.item, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
        return writer;
    };

    /**
     * Encodes the specified ItemOp message, length delimited. Does not implicitly {@link ItemOp.verify|verify} messages.
     * @function encodeDelimited
     * @memberof ItemOp
     * @static
     * @param {IItemOp} message ItemOp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ItemOp.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an ItemOp message from the specified reader or buffer.
     * @function decode
     * @memberof ItemOp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {ItemOp} ItemOp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ItemOp.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ItemOp();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.type = reader.int32();
                break;
            case 2:
                message.item = $root.Item.decode(reader, reader.uint32());
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an ItemOp message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof ItemOp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {ItemOp} ItemOp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ItemOp.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an ItemOp message.
     * @function verify
     * @memberof ItemOp
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    ItemOp.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.type != null && message.hasOwnProperty("type"))
            if (!$util.isInteger(message.type))
                return "type: integer expected";
        if (message.item != null && message.hasOwnProperty("item")) {
            var error = $root.Item.verify(message.item);
            if (error)
                return "item." + error;
        }
        return null;
    };

    /**
     * Creates an ItemOp message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof ItemOp
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {ItemOp} ItemOp
     */
    ItemOp.fromObject = function fromObject(object) {
        if (object instanceof $root.ItemOp)
            return object;
        var message = new $root.ItemOp();
        if (object.type != null)
            message.type = object.type | 0;
        if (object.item != null) {
            if (typeof object.item !== "object")
                throw TypeError(".ItemOp.item: object expected");
            message.item = $root.Item.fromObject(object.item);
        }
        return message;
    };

    /**
     * Creates a plain object from an ItemOp message. Also converts values to other types if specified.
     * @function toObject
     * @memberof ItemOp
     * @static
     * @param {ItemOp} message ItemOp
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    ItemOp.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.type = 0;
            object.item = null;
        }
        if (message.type != null && message.hasOwnProperty("type"))
            object.type = message.type;
        if (message.item != null && message.hasOwnProperty("item"))
            object.item = $root.Item.toObject(message.item, options);
        return object;
    };

    /**
     * Converts this ItemOp to JSON.
     * @function toJSON
     * @memberof ItemOp
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    ItemOp.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return ItemOp;
})();

$root.ItemOperationsAck = (function() {

    /**
     * Properties of an ItemOperationsAck.
     * @exports IItemOperationsAck
     * @interface IItemOperationsAck
     * @property {Array.<IItemOp>|null} [itemOps] ItemOperationsAck itemOps
     */

    /**
     * Constructs a new ItemOperationsAck.
     * @exports ItemOperationsAck
     * @classdesc Represents an ItemOperationsAck.
     * @implements IItemOperationsAck
     * @constructor
     * @param {IItemOperationsAck=} [properties] Properties to set
     */
    function ItemOperationsAck(properties) {
        this.itemOps = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * ItemOperationsAck itemOps.
     * @member {Array.<IItemOp>} itemOps
     * @memberof ItemOperationsAck
     * @instance
     */
    ItemOperationsAck.prototype.itemOps = $util.emptyArray;

    /**
     * Creates a new ItemOperationsAck instance using the specified properties.
     * @function create
     * @memberof ItemOperationsAck
     * @static
     * @param {IItemOperationsAck=} [properties] Properties to set
     * @returns {ItemOperationsAck} ItemOperationsAck instance
     */
    ItemOperationsAck.create = function create(properties) {
        return new ItemOperationsAck(properties);
    };

    /**
     * Encodes the specified ItemOperationsAck message. Does not implicitly {@link ItemOperationsAck.verify|verify} messages.
     * @function encode
     * @memberof ItemOperationsAck
     * @static
     * @param {IItemOperationsAck} message ItemOperationsAck message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ItemOperationsAck.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.itemOps != null && message.itemOps.length)
            for (var i = 0; i < message.itemOps.length; ++i)
                $root.ItemOp.encode(message.itemOps[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
        return writer;
    };

    /**
     * Encodes the specified ItemOperationsAck message, length delimited. Does not implicitly {@link ItemOperationsAck.verify|verify} messages.
     * @function encodeDelimited
     * @memberof ItemOperationsAck
     * @static
     * @param {IItemOperationsAck} message ItemOperationsAck message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ItemOperationsAck.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an ItemOperationsAck message from the specified reader or buffer.
     * @function decode
     * @memberof ItemOperationsAck
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {ItemOperationsAck} ItemOperationsAck
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ItemOperationsAck.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ItemOperationsAck();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                if (!(message.itemOps && message.itemOps.length))
                    message.itemOps = [];
                message.itemOps.push($root.ItemOp.decode(reader, reader.uint32()));
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an ItemOperationsAck message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof ItemOperationsAck
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {ItemOperationsAck} ItemOperationsAck
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ItemOperationsAck.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an ItemOperationsAck message.
     * @function verify
     * @memberof ItemOperationsAck
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    ItemOperationsAck.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.itemOps != null && message.hasOwnProperty("itemOps")) {
            if (!Array.isArray(message.itemOps))
                return "itemOps: array expected";
            for (var i = 0; i < message.itemOps.length; ++i) {
                var error = $root.ItemOp.verify(message.itemOps[i]);
                if (error)
                    return "itemOps." + error;
            }
        }
        return null;
    };

    /**
     * Creates an ItemOperationsAck message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof ItemOperationsAck
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {ItemOperationsAck} ItemOperationsAck
     */
    ItemOperationsAck.fromObject = function fromObject(object) {
        if (object instanceof $root.ItemOperationsAck)
            return object;
        var message = new $root.ItemOperationsAck();
        if (object.itemOps) {
            if (!Array.isArray(object.itemOps))
                throw TypeError(".ItemOperationsAck.itemOps: array expected");
            message.itemOps = [];
            for (var i = 0; i < object.itemOps.length; ++i) {
                if (typeof object.itemOps[i] !== "object")
                    throw TypeError(".ItemOperationsAck.itemOps: object expected");
                message.itemOps[i] = $root.ItemOp.fromObject(object.itemOps[i]);
            }
        }
        return message;
    };

    /**
     * Creates a plain object from an ItemOperationsAck message. Also converts values to other types if specified.
     * @function toObject
     * @memberof ItemOperationsAck
     * @static
     * @param {ItemOperationsAck} message ItemOperationsAck
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    ItemOperationsAck.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults)
            object.itemOps = [];
        if (message.itemOps && message.itemOps.length) {
            object.itemOps = [];
            for (var j = 0; j < message.itemOps.length; ++j)
                object.itemOps[j] = $root.ItemOp.toObject(message.itemOps[j], options);
        }
        return object;
    };

    /**
     * Converts this ItemOperationsAck to JSON.
     * @function toJSON
     * @memberof ItemOperationsAck
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    ItemOperationsAck.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return ItemOperationsAck;
})();

$root.MergeReq = (function() {

    /**
     * Properties of a MergeReq.
     * @exports IMergeReq
     * @interface IMergeReq
     * @property {number|null} [cid] MergeReq cid
     */

    /**
     * Constructs a new MergeReq.
     * @exports MergeReq
     * @classdesc Represents a MergeReq.
     * @implements IMergeReq
     * @constructor
     * @param {IMergeReq=} [properties] Properties to set
     */
    function MergeReq(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * MergeReq cid.
     * @member {number} cid
     * @memberof MergeReq
     * @instance
     */
    MergeReq.prototype.cid = 0;

    /**
     * Creates a new MergeReq instance using the specified properties.
     * @function create
     * @memberof MergeReq
     * @static
     * @param {IMergeReq=} [properties] Properties to set
     * @returns {MergeReq} MergeReq instance
     */
    MergeReq.create = function create(properties) {
        return new MergeReq(properties);
    };

    /**
     * Encodes the specified MergeReq message. Does not implicitly {@link MergeReq.verify|verify} messages.
     * @function encode
     * @memberof MergeReq
     * @static
     * @param {IMergeReq} message MergeReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    MergeReq.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.cid != null && message.hasOwnProperty("cid"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cid);
        return writer;
    };

    /**
     * Encodes the specified MergeReq message, length delimited. Does not implicitly {@link MergeReq.verify|verify} messages.
     * @function encodeDelimited
     * @memberof MergeReq
     * @static
     * @param {IMergeReq} message MergeReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    MergeReq.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a MergeReq message from the specified reader or buffer.
     * @function decode
     * @memberof MergeReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {MergeReq} MergeReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    MergeReq.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MergeReq();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.cid = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a MergeReq message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof MergeReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {MergeReq} MergeReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    MergeReq.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a MergeReq message.
     * @function verify
     * @memberof MergeReq
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    MergeReq.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.cid != null && message.hasOwnProperty("cid"))
            if (!$util.isInteger(message.cid))
                return "cid: integer expected";
        return null;
    };

    /**
     * Creates a MergeReq message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof MergeReq
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {MergeReq} MergeReq
     */
    MergeReq.fromObject = function fromObject(object) {
        if (object instanceof $root.MergeReq)
            return object;
        var message = new $root.MergeReq();
        if (object.cid != null)
            message.cid = object.cid | 0;
        return message;
    };

    /**
     * Creates a plain object from a MergeReq message. Also converts values to other types if specified.
     * @function toObject
     * @memberof MergeReq
     * @static
     * @param {MergeReq} message MergeReq
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    MergeReq.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.cid = 0;
        if (message.cid != null && message.hasOwnProperty("cid"))
            object.cid = message.cid;
        return object;
    };

    /**
     * Converts this MergeReq to JSON.
     * @function toJSON
     * @memberof MergeReq
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    MergeReq.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return MergeReq;
})();

$root.BuyReq = (function() {

    /**
     * Properties of a BuyReq.
     * @exports IBuyReq
     * @interface IBuyReq
     * @property {number|null} [cid] BuyReq cid
     */

    /**
     * Constructs a new BuyReq.
     * @exports BuyReq
     * @classdesc Represents a BuyReq.
     * @implements IBuyReq
     * @constructor
     * @param {IBuyReq=} [properties] Properties to set
     */
    function BuyReq(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * BuyReq cid.
     * @member {number} cid
     * @memberof BuyReq
     * @instance
     */
    BuyReq.prototype.cid = 0;

    /**
     * Creates a new BuyReq instance using the specified properties.
     * @function create
     * @memberof BuyReq
     * @static
     * @param {IBuyReq=} [properties] Properties to set
     * @returns {BuyReq} BuyReq instance
     */
    BuyReq.create = function create(properties) {
        return new BuyReq(properties);
    };

    /**
     * Encodes the specified BuyReq message. Does not implicitly {@link BuyReq.verify|verify} messages.
     * @function encode
     * @memberof BuyReq
     * @static
     * @param {IBuyReq} message BuyReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    BuyReq.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.cid != null && message.hasOwnProperty("cid"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cid);
        return writer;
    };

    /**
     * Encodes the specified BuyReq message, length delimited. Does not implicitly {@link BuyReq.verify|verify} messages.
     * @function encodeDelimited
     * @memberof BuyReq
     * @static
     * @param {IBuyReq} message BuyReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    BuyReq.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a BuyReq message from the specified reader or buffer.
     * @function decode
     * @memberof BuyReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {BuyReq} BuyReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    BuyReq.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.BuyReq();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.cid = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a BuyReq message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof BuyReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {BuyReq} BuyReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    BuyReq.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a BuyReq message.
     * @function verify
     * @memberof BuyReq
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    BuyReq.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.cid != null && message.hasOwnProperty("cid"))
            if (!$util.isInteger(message.cid))
                return "cid: integer expected";
        return null;
    };

    /**
     * Creates a BuyReq message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof BuyReq
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {BuyReq} BuyReq
     */
    BuyReq.fromObject = function fromObject(object) {
        if (object instanceof $root.BuyReq)
            return object;
        var message = new $root.BuyReq();
        if (object.cid != null)
            message.cid = object.cid | 0;
        return message;
    };

    /**
     * Creates a plain object from a BuyReq message. Also converts values to other types if specified.
     * @function toObject
     * @memberof BuyReq
     * @static
     * @param {BuyReq} message BuyReq
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    BuyReq.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.cid = 0;
        if (message.cid != null && message.hasOwnProperty("cid"))
            object.cid = message.cid;
        return object;
    };

    /**
     * Converts this BuyReq to JSON.
     * @function toJSON
     * @memberof BuyReq
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    BuyReq.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return BuyReq;
})();

$root.CommonResult = (function() {

    /**
     * Properties of a CommonResult.
     * @exports ICommonResult
     * @interface ICommonResult
     * @property {number|null} [code] CommonResult code
     * @property {number|null} [errorCode] CommonResult errorCode
     */

    /**
     * Constructs a new CommonResult.
     * @exports CommonResult
     * @classdesc Represents a CommonResult.
     * @implements ICommonResult
     * @constructor
     * @param {ICommonResult=} [properties] Properties to set
     */
    function CommonResult(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * CommonResult code.
     * @member {number} code
     * @memberof CommonResult
     * @instance
     */
    CommonResult.prototype.code = 0;

    /**
     * CommonResult errorCode.
     * @member {number} errorCode
     * @memberof CommonResult
     * @instance
     */
    CommonResult.prototype.errorCode = 0;

    /**
     * Creates a new CommonResult instance using the specified properties.
     * @function create
     * @memberof CommonResult
     * @static
     * @param {ICommonResult=} [properties] Properties to set
     * @returns {CommonResult} CommonResult instance
     */
    CommonResult.create = function create(properties) {
        return new CommonResult(properties);
    };

    /**
     * Encodes the specified CommonResult message. Does not implicitly {@link CommonResult.verify|verify} messages.
     * @function encode
     * @memberof CommonResult
     * @static
     * @param {ICommonResult} message CommonResult message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    CommonResult.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.code != null && message.hasOwnProperty("code"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
        if (message.errorCode != null && message.hasOwnProperty("errorCode"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.errorCode);
        return writer;
    };

    /**
     * Encodes the specified CommonResult message, length delimited. Does not implicitly {@link CommonResult.verify|verify} messages.
     * @function encodeDelimited
     * @memberof CommonResult
     * @static
     * @param {ICommonResult} message CommonResult message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    CommonResult.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a CommonResult message from the specified reader or buffer.
     * @function decode
     * @memberof CommonResult
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {CommonResult} CommonResult
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    CommonResult.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CommonResult();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.code = reader.int32();
                break;
            case 2:
                message.errorCode = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a CommonResult message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof CommonResult
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {CommonResult} CommonResult
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    CommonResult.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a CommonResult message.
     * @function verify
     * @memberof CommonResult
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    CommonResult.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.code != null && message.hasOwnProperty("code"))
            if (!$util.isInteger(message.code))
                return "code: integer expected";
        if (message.errorCode != null && message.hasOwnProperty("errorCode"))
            if (!$util.isInteger(message.errorCode))
                return "errorCode: integer expected";
        return null;
    };

    /**
     * Creates a CommonResult message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof CommonResult
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {CommonResult} CommonResult
     */
    CommonResult.fromObject = function fromObject(object) {
        if (object instanceof $root.CommonResult)
            return object;
        var message = new $root.CommonResult();
        if (object.code != null)
            message.code = object.code | 0;
        if (object.errorCode != null)
            message.errorCode = object.errorCode | 0;
        return message;
    };

    /**
     * Creates a plain object from a CommonResult message. Also converts values to other types if specified.
     * @function toObject
     * @memberof CommonResult
     * @static
     * @param {CommonResult} message CommonResult
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    CommonResult.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.code = 0;
            object.errorCode = 0;
        }
        if (message.code != null && message.hasOwnProperty("code"))
            object.code = message.code;
        if (message.errorCode != null && message.hasOwnProperty("errorCode"))
            object.errorCode = message.errorCode;
        return object;
    };

    /**
     * Converts this CommonResult to JSON.
     * @function toJSON
     * @memberof CommonResult
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    CommonResult.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return CommonResult;
})();

/**
 * errorCode enum.
 * @exports errorCode
 * @enum {string}
 * @property {number} NOT_EXIST=0 NOT_EXIST value
 * @property {number} NOT_ALLOW=1 NOT_ALLOW value
 * @property {number} GOLD_NOT_ENOUGH=2 GOLD_NOT_ENOUGH value
 * @property {number} DIAMOND_NOT_ENOUGH=3 DIAMOND_NOT_ENOUGH value
 * @property {number} ALREADY_OWNED=4 ALREADY_OWNED value
 * @property {number} GOODS_NOT_ENOUGH=5 GOODS_NOT_ENOUGH value
 * @property {number} ALREADY_RECEIVED=6 ALREADY_RECEIVED value
 */
$root.errorCode = (function() {
    var valuesById = {}, values = Object.create(valuesById);
    values[valuesById[0] = "NOT_EXIST"] = 0;
    values[valuesById[1] = "NOT_ALLOW"] = 1;
    values[valuesById[2] = "GOLD_NOT_ENOUGH"] = 2;
    values[valuesById[3] = "DIAMOND_NOT_ENOUGH"] = 3;
    values[valuesById[4] = "ALREADY_OWNED"] = 4;
    values[valuesById[5] = "GOODS_NOT_ENOUGH"] = 5;
    values[valuesById[6] = "ALREADY_RECEIVED"] = 6;
    return values;
})();

$root.RedPoint = (function() {

    /**
     * Properties of a RedPoint.
     * @exports IRedPoint
     * @interface IRedPoint
     * @property {Array.<number>|null} [type] RedPoint type
     */

    /**
     * Constructs a new RedPoint.
     * @exports RedPoint
     * @classdesc Represents a RedPoint.
     * @implements IRedPoint
     * @constructor
     * @param {IRedPoint=} [properties] Properties to set
     */
    function RedPoint(properties) {
        this.type = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * RedPoint type.
     * @member {Array.<number>} type
     * @memberof RedPoint
     * @instance
     */
    RedPoint.prototype.type = $util.emptyArray;

    /**
     * Creates a new RedPoint instance using the specified properties.
     * @function create
     * @memberof RedPoint
     * @static
     * @param {IRedPoint=} [properties] Properties to set
     * @returns {RedPoint} RedPoint instance
     */
    RedPoint.create = function create(properties) {
        return new RedPoint(properties);
    };

    /**
     * Encodes the specified RedPoint message. Does not implicitly {@link RedPoint.verify|verify} messages.
     * @function encode
     * @memberof RedPoint
     * @static
     * @param {IRedPoint} message RedPoint message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RedPoint.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.type != null && message.type.length) {
            writer.uint32(/* id 1, wireType 2 =*/10).fork();
            for (var i = 0; i < message.type.length; ++i)
                writer.int32(message.type[i]);
            writer.ldelim();
        }
        return writer;
    };

    /**
     * Encodes the specified RedPoint message, length delimited. Does not implicitly {@link RedPoint.verify|verify} messages.
     * @function encodeDelimited
     * @memberof RedPoint
     * @static
     * @param {IRedPoint} message RedPoint message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RedPoint.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a RedPoint message from the specified reader or buffer.
     * @function decode
     * @memberof RedPoint
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {RedPoint} RedPoint
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RedPoint.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RedPoint();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                if (!(message.type && message.type.length))
                    message.type = [];
                if ((tag & 7) === 2) {
                    var end2 = reader.uint32() + reader.pos;
                    while (reader.pos < end2)
                        message.type.push(reader.int32());
                } else
                    message.type.push(reader.int32());
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a RedPoint message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof RedPoint
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {RedPoint} RedPoint
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RedPoint.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a RedPoint message.
     * @function verify
     * @memberof RedPoint
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    RedPoint.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.type != null && message.hasOwnProperty("type")) {
            if (!Array.isArray(message.type))
                return "type: array expected";
            for (var i = 0; i < message.type.length; ++i)
                if (!$util.isInteger(message.type[i]))
                    return "type: integer[] expected";
        }
        return null;
    };

    /**
     * Creates a RedPoint message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof RedPoint
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {RedPoint} RedPoint
     */
    RedPoint.fromObject = function fromObject(object) {
        if (object instanceof $root.RedPoint)
            return object;
        var message = new $root.RedPoint();
        if (object.type) {
            if (!Array.isArray(object.type))
                throw TypeError(".RedPoint.type: array expected");
            message.type = [];
            for (var i = 0; i < object.type.length; ++i)
                message.type[i] = object.type[i] | 0;
        }
        return message;
    };

    /**
     * Creates a plain object from a RedPoint message. Also converts values to other types if specified.
     * @function toObject
     * @memberof RedPoint
     * @static
     * @param {RedPoint} message RedPoint
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    RedPoint.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults)
            object.type = [];
        if (message.type && message.type.length) {
            object.type = [];
            for (var j = 0; j < message.type.length; ++j)
                object.type[j] = message.type[j];
        }
        return object;
    };

    /**
     * Converts this RedPoint to JSON.
     * @function toJSON
     * @memberof RedPoint
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    RedPoint.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return RedPoint;
})();

$root.GameEnd = (function() {

    /**
     * Properties of a GameEnd.
     * @exports IGameEnd
     * @interface IGameEnd
     * @property {number|null} [type] GameEnd type
     * @property {number|null} [rank] GameEnd rank
     * @property {number|null} [score] GameEnd score
     * @property {number|null} [kill] GameEnd kill
     * @property {number|null} [bekill] GameEnd bekill
     * @property {number|null} [time] GameEnd time
     */

    /**
     * Constructs a new GameEnd.
     * @exports GameEnd
     * @classdesc Represents a GameEnd.
     * @implements IGameEnd
     * @constructor
     * @param {IGameEnd=} [properties] Properties to set
     */
    function GameEnd(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * GameEnd type.
     * @member {number} type
     * @memberof GameEnd
     * @instance
     */
    GameEnd.prototype.type = 0;

    /**
     * GameEnd rank.
     * @member {number} rank
     * @memberof GameEnd
     * @instance
     */
    GameEnd.prototype.rank = 0;

    /**
     * GameEnd score.
     * @member {number} score
     * @memberof GameEnd
     * @instance
     */
    GameEnd.prototype.score = 0;

    /**
     * GameEnd kill.
     * @member {number} kill
     * @memberof GameEnd
     * @instance
     */
    GameEnd.prototype.kill = 0;

    /**
     * GameEnd bekill.
     * @member {number} bekill
     * @memberof GameEnd
     * @instance
     */
    GameEnd.prototype.bekill = 0;

    /**
     * GameEnd time.
     * @member {number} time
     * @memberof GameEnd
     * @instance
     */
    GameEnd.prototype.time = 0;

    /**
     * Creates a new GameEnd instance using the specified properties.
     * @function create
     * @memberof GameEnd
     * @static
     * @param {IGameEnd=} [properties] Properties to set
     * @returns {GameEnd} GameEnd instance
     */
    GameEnd.create = function create(properties) {
        return new GameEnd(properties);
    };

    /**
     * Encodes the specified GameEnd message. Does not implicitly {@link GameEnd.verify|verify} messages.
     * @function encode
     * @memberof GameEnd
     * @static
     * @param {IGameEnd} message GameEnd message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    GameEnd.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.type != null && message.hasOwnProperty("type"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
        if (message.rank != null && message.hasOwnProperty("rank"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rank);
        if (message.score != null && message.hasOwnProperty("score"))
            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.score);
        if (message.kill != null && message.hasOwnProperty("kill"))
            writer.uint32(/* id 4, wireType 0 =*/32).int32(message.kill);
        if (message.bekill != null && message.hasOwnProperty("bekill"))
            writer.uint32(/* id 5, wireType 0 =*/40).int32(message.bekill);
        if (message.time != null && message.hasOwnProperty("time"))
            writer.uint32(/* id 6, wireType 0 =*/48).int32(message.time);
        return writer;
    };

    /**
     * Encodes the specified GameEnd message, length delimited. Does not implicitly {@link GameEnd.verify|verify} messages.
     * @function encodeDelimited
     * @memberof GameEnd
     * @static
     * @param {IGameEnd} message GameEnd message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    GameEnd.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a GameEnd message from the specified reader or buffer.
     * @function decode
     * @memberof GameEnd
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {GameEnd} GameEnd
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    GameEnd.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.GameEnd();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.type = reader.int32();
                break;
            case 2:
                message.rank = reader.int32();
                break;
            case 3:
                message.score = reader.int32();
                break;
            case 4:
                message.kill = reader.int32();
                break;
            case 5:
                message.bekill = reader.int32();
                break;
            case 6:
                message.time = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a GameEnd message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof GameEnd
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {GameEnd} GameEnd
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    GameEnd.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a GameEnd message.
     * @function verify
     * @memberof GameEnd
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    GameEnd.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.type != null && message.hasOwnProperty("type"))
            if (!$util.isInteger(message.type))
                return "type: integer expected";
        if (message.rank != null && message.hasOwnProperty("rank"))
            if (!$util.isInteger(message.rank))
                return "rank: integer expected";
        if (message.score != null && message.hasOwnProperty("score"))
            if (!$util.isInteger(message.score))
                return "score: integer expected";
        if (message.kill != null && message.hasOwnProperty("kill"))
            if (!$util.isInteger(message.kill))
                return "kill: integer expected";
        if (message.bekill != null && message.hasOwnProperty("bekill"))
            if (!$util.isInteger(message.bekill))
                return "bekill: integer expected";
        if (message.time != null && message.hasOwnProperty("time"))
            if (!$util.isInteger(message.time))
                return "time: integer expected";
        return null;
    };

    /**
     * Creates a GameEnd message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof GameEnd
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {GameEnd} GameEnd
     */
    GameEnd.fromObject = function fromObject(object) {
        if (object instanceof $root.GameEnd)
            return object;
        var message = new $root.GameEnd();
        if (object.type != null)
            message.type = object.type | 0;
        if (object.rank != null)
            message.rank = object.rank | 0;
        if (object.score != null)
            message.score = object.score | 0;
        if (object.kill != null)
            message.kill = object.kill | 0;
        if (object.bekill != null)
            message.bekill = object.bekill | 0;
        if (object.time != null)
            message.time = object.time | 0;
        return message;
    };

    /**
     * Creates a plain object from a GameEnd message. Also converts values to other types if specified.
     * @function toObject
     * @memberof GameEnd
     * @static
     * @param {GameEnd} message GameEnd
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    GameEnd.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.type = 0;
            object.rank = 0;
            object.score = 0;
            object.kill = 0;
            object.bekill = 0;
            object.time = 0;
        }
        if (message.type != null && message.hasOwnProperty("type"))
            object.type = message.type;
        if (message.rank != null && message.hasOwnProperty("rank"))
            object.rank = message.rank;
        if (message.score != null && message.hasOwnProperty("score"))
            object.score = message.score;
        if (message.kill != null && message.hasOwnProperty("kill"))
            object.kill = message.kill;
        if (message.bekill != null && message.hasOwnProperty("bekill"))
            object.bekill = message.bekill;
        if (message.time != null && message.hasOwnProperty("time"))
            object.time = message.time;
        return object;
    };

    /**
     * Converts this GameEnd to JSON.
     * @function toJSON
     * @memberof GameEnd
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    GameEnd.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return GameEnd;
})();

$root.EveryDayGiftReq = (function() {

    /**
     * Properties of an EveryDayGiftReq.
     * @exports IEveryDayGiftReq
     * @interface IEveryDayGiftReq
     * @property {number|null} [type] EveryDayGiftReq type
     */

    /**
     * Constructs a new EveryDayGiftReq.
     * @exports EveryDayGiftReq
     * @classdesc Represents an EveryDayGiftReq.
     * @implements IEveryDayGiftReq
     * @constructor
     * @param {IEveryDayGiftReq=} [properties] Properties to set
     */
    function EveryDayGiftReq(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * EveryDayGiftReq type.
     * @member {number} type
     * @memberof EveryDayGiftReq
     * @instance
     */
    EveryDayGiftReq.prototype.type = 0;

    /**
     * Creates a new EveryDayGiftReq instance using the specified properties.
     * @function create
     * @memberof EveryDayGiftReq
     * @static
     * @param {IEveryDayGiftReq=} [properties] Properties to set
     * @returns {EveryDayGiftReq} EveryDayGiftReq instance
     */
    EveryDayGiftReq.create = function create(properties) {
        return new EveryDayGiftReq(properties);
    };

    /**
     * Encodes the specified EveryDayGiftReq message. Does not implicitly {@link EveryDayGiftReq.verify|verify} messages.
     * @function encode
     * @memberof EveryDayGiftReq
     * @static
     * @param {IEveryDayGiftReq} message EveryDayGiftReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    EveryDayGiftReq.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.type != null && message.hasOwnProperty("type"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
        return writer;
    };

    /**
     * Encodes the specified EveryDayGiftReq message, length delimited. Does not implicitly {@link EveryDayGiftReq.verify|verify} messages.
     * @function encodeDelimited
     * @memberof EveryDayGiftReq
     * @static
     * @param {IEveryDayGiftReq} message EveryDayGiftReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    EveryDayGiftReq.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an EveryDayGiftReq message from the specified reader or buffer.
     * @function decode
     * @memberof EveryDayGiftReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {EveryDayGiftReq} EveryDayGiftReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    EveryDayGiftReq.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.EveryDayGiftReq();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.type = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an EveryDayGiftReq message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof EveryDayGiftReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {EveryDayGiftReq} EveryDayGiftReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    EveryDayGiftReq.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an EveryDayGiftReq message.
     * @function verify
     * @memberof EveryDayGiftReq
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    EveryDayGiftReq.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.type != null && message.hasOwnProperty("type"))
            if (!$util.isInteger(message.type))
                return "type: integer expected";
        return null;
    };

    /**
     * Creates an EveryDayGiftReq message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof EveryDayGiftReq
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {EveryDayGiftReq} EveryDayGiftReq
     */
    EveryDayGiftReq.fromObject = function fromObject(object) {
        if (object instanceof $root.EveryDayGiftReq)
            return object;
        var message = new $root.EveryDayGiftReq();
        if (object.type != null)
            message.type = object.type | 0;
        return message;
    };

    /**
     * Creates a plain object from an EveryDayGiftReq message. Also converts values to other types if specified.
     * @function toObject
     * @memberof EveryDayGiftReq
     * @static
     * @param {EveryDayGiftReq} message EveryDayGiftReq
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    EveryDayGiftReq.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.type = 0;
        if (message.type != null && message.hasOwnProperty("type"))
            object.type = message.type;
        return object;
    };

    /**
     * Converts this EveryDayGiftReq to JSON.
     * @function toJSON
     * @memberof EveryDayGiftReq
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    EveryDayGiftReq.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return EveryDayGiftReq;
})();

$root.EveryDayGiftRsp = (function() {

    /**
     * Properties of an EveryDayGiftRsp.
     * @exports IEveryDayGiftRsp
     * @interface IEveryDayGiftRsp
     * @property {number|null} [statu] EveryDayGiftRsp statu
     */

    /**
     * Constructs a new EveryDayGiftRsp.
     * @exports EveryDayGiftRsp
     * @classdesc Represents an EveryDayGiftRsp.
     * @implements IEveryDayGiftRsp
     * @constructor
     * @param {IEveryDayGiftRsp=} [properties] Properties to set
     */
    function EveryDayGiftRsp(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * EveryDayGiftRsp statu.
     * @member {number} statu
     * @memberof EveryDayGiftRsp
     * @instance
     */
    EveryDayGiftRsp.prototype.statu = 0;

    /**
     * Creates a new EveryDayGiftRsp instance using the specified properties.
     * @function create
     * @memberof EveryDayGiftRsp
     * @static
     * @param {IEveryDayGiftRsp=} [properties] Properties to set
     * @returns {EveryDayGiftRsp} EveryDayGiftRsp instance
     */
    EveryDayGiftRsp.create = function create(properties) {
        return new EveryDayGiftRsp(properties);
    };

    /**
     * Encodes the specified EveryDayGiftRsp message. Does not implicitly {@link EveryDayGiftRsp.verify|verify} messages.
     * @function encode
     * @memberof EveryDayGiftRsp
     * @static
     * @param {IEveryDayGiftRsp} message EveryDayGiftRsp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    EveryDayGiftRsp.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.statu != null && message.hasOwnProperty("statu"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.statu);
        return writer;
    };

    /**
     * Encodes the specified EveryDayGiftRsp message, length delimited. Does not implicitly {@link EveryDayGiftRsp.verify|verify} messages.
     * @function encodeDelimited
     * @memberof EveryDayGiftRsp
     * @static
     * @param {IEveryDayGiftRsp} message EveryDayGiftRsp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    EveryDayGiftRsp.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an EveryDayGiftRsp message from the specified reader or buffer.
     * @function decode
     * @memberof EveryDayGiftRsp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {EveryDayGiftRsp} EveryDayGiftRsp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    EveryDayGiftRsp.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.EveryDayGiftRsp();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.statu = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an EveryDayGiftRsp message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof EveryDayGiftRsp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {EveryDayGiftRsp} EveryDayGiftRsp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    EveryDayGiftRsp.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an EveryDayGiftRsp message.
     * @function verify
     * @memberof EveryDayGiftRsp
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    EveryDayGiftRsp.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.statu != null && message.hasOwnProperty("statu"))
            if (!$util.isInteger(message.statu))
                return "statu: integer expected";
        return null;
    };

    /**
     * Creates an EveryDayGiftRsp message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof EveryDayGiftRsp
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {EveryDayGiftRsp} EveryDayGiftRsp
     */
    EveryDayGiftRsp.fromObject = function fromObject(object) {
        if (object instanceof $root.EveryDayGiftRsp)
            return object;
        var message = new $root.EveryDayGiftRsp();
        if (object.statu != null)
            message.statu = object.statu | 0;
        return message;
    };

    /**
     * Creates a plain object from an EveryDayGiftRsp message. Also converts values to other types if specified.
     * @function toObject
     * @memberof EveryDayGiftRsp
     * @static
     * @param {EveryDayGiftRsp} message EveryDayGiftRsp
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    EveryDayGiftRsp.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.statu = 0;
        if (message.statu != null && message.hasOwnProperty("statu"))
            object.statu = message.statu;
        return object;
    };

    /**
     * Converts this EveryDayGiftRsp to JSON.
     * @function toJSON
     * @memberof EveryDayGiftRsp
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    EveryDayGiftRsp.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return EveryDayGiftRsp;
})();

$root.Guide = (function() {

    /**
     * Properties of a Guide.
     * @exports IGuide
     * @interface IGuide
     */

    /**
     * Constructs a new Guide.
     * @exports Guide
     * @classdesc Represents a Guide.
     * @implements IGuide
     * @constructor
     * @param {IGuide=} [properties] Properties to set
     */
    function Guide(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Creates a new Guide instance using the specified properties.
     * @function create
     * @memberof Guide
     * @static
     * @param {IGuide=} [properties] Properties to set
     * @returns {Guide} Guide instance
     */
    Guide.create = function create(properties) {
        return new Guide(properties);
    };

    /**
     * Encodes the specified Guide message. Does not implicitly {@link Guide.verify|verify} messages.
     * @function encode
     * @memberof Guide
     * @static
     * @param {IGuide} message Guide message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Guide.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        return writer;
    };

    /**
     * Encodes the specified Guide message, length delimited. Does not implicitly {@link Guide.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Guide
     * @static
     * @param {IGuide} message Guide message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Guide.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a Guide message from the specified reader or buffer.
     * @function decode
     * @memberof Guide
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Guide} Guide
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Guide.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Guide();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a Guide message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Guide
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Guide} Guide
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Guide.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a Guide message.
     * @function verify
     * @memberof Guide
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Guide.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        return null;
    };

    /**
     * Creates a Guide message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Guide
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Guide} Guide
     */
    Guide.fromObject = function fromObject(object) {
        if (object instanceof $root.Guide)
            return object;
        return new $root.Guide();
    };

    /**
     * Creates a plain object from a Guide message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Guide
     * @static
     * @param {Guide} message Guide
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Guide.toObject = function toObject() {
        return {};
    };

    /**
     * Converts this Guide to JSON.
     * @function toJSON
     * @memberof Guide
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Guide.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return Guide;
})();

$root.InviteStateReq = (function() {

    /**
     * Properties of an InviteStateReq.
     * @exports IInviteStateReq
     * @interface IInviteStateReq
     * @property {number|null} [type] InviteStateReq type
     */

    /**
     * Constructs a new InviteStateReq.
     * @exports InviteStateReq
     * @classdesc Represents an InviteStateReq.
     * @implements IInviteStateReq
     * @constructor
     * @param {IInviteStateReq=} [properties] Properties to set
     */
    function InviteStateReq(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * InviteStateReq type.
     * @member {number} type
     * @memberof InviteStateReq
     * @instance
     */
    InviteStateReq.prototype.type = 0;

    /**
     * Creates a new InviteStateReq instance using the specified properties.
     * @function create
     * @memberof InviteStateReq
     * @static
     * @param {IInviteStateReq=} [properties] Properties to set
     * @returns {InviteStateReq} InviteStateReq instance
     */
    InviteStateReq.create = function create(properties) {
        return new InviteStateReq(properties);
    };

    /**
     * Encodes the specified InviteStateReq message. Does not implicitly {@link InviteStateReq.verify|verify} messages.
     * @function encode
     * @memberof InviteStateReq
     * @static
     * @param {IInviteStateReq} message InviteStateReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    InviteStateReq.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.type != null && message.hasOwnProperty("type"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
        return writer;
    };

    /**
     * Encodes the specified InviteStateReq message, length delimited. Does not implicitly {@link InviteStateReq.verify|verify} messages.
     * @function encodeDelimited
     * @memberof InviteStateReq
     * @static
     * @param {IInviteStateReq} message InviteStateReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    InviteStateReq.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an InviteStateReq message from the specified reader or buffer.
     * @function decode
     * @memberof InviteStateReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {InviteStateReq} InviteStateReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    InviteStateReq.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.InviteStateReq();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.type = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an InviteStateReq message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof InviteStateReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {InviteStateReq} InviteStateReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    InviteStateReq.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an InviteStateReq message.
     * @function verify
     * @memberof InviteStateReq
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    InviteStateReq.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.type != null && message.hasOwnProperty("type"))
            if (!$util.isInteger(message.type))
                return "type: integer expected";
        return null;
    };

    /**
     * Creates an InviteStateReq message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof InviteStateReq
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {InviteStateReq} InviteStateReq
     */
    InviteStateReq.fromObject = function fromObject(object) {
        if (object instanceof $root.InviteStateReq)
            return object;
        var message = new $root.InviteStateReq();
        if (object.type != null)
            message.type = object.type | 0;
        return message;
    };

    /**
     * Creates a plain object from an InviteStateReq message. Also converts values to other types if specified.
     * @function toObject
     * @memberof InviteStateReq
     * @static
     * @param {InviteStateReq} message InviteStateReq
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    InviteStateReq.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.type = 0;
        if (message.type != null && message.hasOwnProperty("type"))
            object.type = message.type;
        return object;
    };

    /**
     * Converts this InviteStateReq to JSON.
     * @function toJSON
     * @memberof InviteStateReq
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    InviteStateReq.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return InviteStateReq;
})();

$root.InviteStateRsp = (function() {

    /**
     * Properties of an InviteStateRsp.
     * @exports IInviteStateRsp
     * @interface IInviteStateRsp
     * @property {Array.<IInviteState>|null} [inviteState] InviteStateRsp inviteState
     */

    /**
     * Constructs a new InviteStateRsp.
     * @exports InviteStateRsp
     * @classdesc Represents an InviteStateRsp.
     * @implements IInviteStateRsp
     * @constructor
     * @param {IInviteStateRsp=} [properties] Properties to set
     */
    function InviteStateRsp(properties) {
        this.inviteState = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * InviteStateRsp inviteState.
     * @member {Array.<IInviteState>} inviteState
     * @memberof InviteStateRsp
     * @instance
     */
    InviteStateRsp.prototype.inviteState = $util.emptyArray;

    /**
     * Creates a new InviteStateRsp instance using the specified properties.
     * @function create
     * @memberof InviteStateRsp
     * @static
     * @param {IInviteStateRsp=} [properties] Properties to set
     * @returns {InviteStateRsp} InviteStateRsp instance
     */
    InviteStateRsp.create = function create(properties) {
        return new InviteStateRsp(properties);
    };

    /**
     * Encodes the specified InviteStateRsp message. Does not implicitly {@link InviteStateRsp.verify|verify} messages.
     * @function encode
     * @memberof InviteStateRsp
     * @static
     * @param {IInviteStateRsp} message InviteStateRsp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    InviteStateRsp.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.inviteState != null && message.inviteState.length)
            for (var i = 0; i < message.inviteState.length; ++i)
                $root.InviteState.encode(message.inviteState[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
        return writer;
    };

    /**
     * Encodes the specified InviteStateRsp message, length delimited. Does not implicitly {@link InviteStateRsp.verify|verify} messages.
     * @function encodeDelimited
     * @memberof InviteStateRsp
     * @static
     * @param {IInviteStateRsp} message InviteStateRsp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    InviteStateRsp.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an InviteStateRsp message from the specified reader or buffer.
     * @function decode
     * @memberof InviteStateRsp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {InviteStateRsp} InviteStateRsp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    InviteStateRsp.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.InviteStateRsp();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                if (!(message.inviteState && message.inviteState.length))
                    message.inviteState = [];
                message.inviteState.push($root.InviteState.decode(reader, reader.uint32()));
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an InviteStateRsp message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof InviteStateRsp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {InviteStateRsp} InviteStateRsp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    InviteStateRsp.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an InviteStateRsp message.
     * @function verify
     * @memberof InviteStateRsp
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    InviteStateRsp.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.inviteState != null && message.hasOwnProperty("inviteState")) {
            if (!Array.isArray(message.inviteState))
                return "inviteState: array expected";
            for (var i = 0; i < message.inviteState.length; ++i) {
                var error = $root.InviteState.verify(message.inviteState[i]);
                if (error)
                    return "inviteState." + error;
            }
        }
        return null;
    };

    /**
     * Creates an InviteStateRsp message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof InviteStateRsp
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {InviteStateRsp} InviteStateRsp
     */
    InviteStateRsp.fromObject = function fromObject(object) {
        if (object instanceof $root.InviteStateRsp)
            return object;
        var message = new $root.InviteStateRsp();
        if (object.inviteState) {
            if (!Array.isArray(object.inviteState))
                throw TypeError(".InviteStateRsp.inviteState: array expected");
            message.inviteState = [];
            for (var i = 0; i < object.inviteState.length; ++i) {
                if (typeof object.inviteState[i] !== "object")
                    throw TypeError(".InviteStateRsp.inviteState: object expected");
                message.inviteState[i] = $root.InviteState.fromObject(object.inviteState[i]);
            }
        }
        return message;
    };

    /**
     * Creates a plain object from an InviteStateRsp message. Also converts values to other types if specified.
     * @function toObject
     * @memberof InviteStateRsp
     * @static
     * @param {InviteStateRsp} message InviteStateRsp
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    InviteStateRsp.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults)
            object.inviteState = [];
        if (message.inviteState && message.inviteState.length) {
            object.inviteState = [];
            for (var j = 0; j < message.inviteState.length; ++j)
                object.inviteState[j] = $root.InviteState.toObject(message.inviteState[j], options);
        }
        return object;
    };

    /**
     * Converts this InviteStateRsp to JSON.
     * @function toJSON
     * @memberof InviteStateRsp
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    InviteStateRsp.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return InviteStateRsp;
})();

$root.InviteState = (function() {

    /**
     * Properties of an InviteState.
     * @exports IInviteState
     * @interface IInviteState
     * @property {number|null} [index] InviteState index
     * @property {number|null} [state] InviteState state
     */

    /**
     * Constructs a new InviteState.
     * @exports InviteState
     * @classdesc Represents an InviteState.
     * @implements IInviteState
     * @constructor
     * @param {IInviteState=} [properties] Properties to set
     */
    function InviteState(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * InviteState index.
     * @member {number} index
     * @memberof InviteState
     * @instance
     */
    InviteState.prototype.index = 0;

    /**
     * InviteState state.
     * @member {number} state
     * @memberof InviteState
     * @instance
     */
    InviteState.prototype.state = 0;

    /**
     * Creates a new InviteState instance using the specified properties.
     * @function create
     * @memberof InviteState
     * @static
     * @param {IInviteState=} [properties] Properties to set
     * @returns {InviteState} InviteState instance
     */
    InviteState.create = function create(properties) {
        return new InviteState(properties);
    };

    /**
     * Encodes the specified InviteState message. Does not implicitly {@link InviteState.verify|verify} messages.
     * @function encode
     * @memberof InviteState
     * @static
     * @param {IInviteState} message InviteState message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    InviteState.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.index != null && message.hasOwnProperty("index"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.index);
        if (message.state != null && message.hasOwnProperty("state"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state);
        return writer;
    };

    /**
     * Encodes the specified InviteState message, length delimited. Does not implicitly {@link InviteState.verify|verify} messages.
     * @function encodeDelimited
     * @memberof InviteState
     * @static
     * @param {IInviteState} message InviteState message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    InviteState.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an InviteState message from the specified reader or buffer.
     * @function decode
     * @memberof InviteState
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {InviteState} InviteState
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    InviteState.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.InviteState();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.index = reader.int32();
                break;
            case 2:
                message.state = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an InviteState message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof InviteState
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {InviteState} InviteState
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    InviteState.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an InviteState message.
     * @function verify
     * @memberof InviteState
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    InviteState.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.index != null && message.hasOwnProperty("index"))
            if (!$util.isInteger(message.index))
                return "index: integer expected";
        if (message.state != null && message.hasOwnProperty("state"))
            if (!$util.isInteger(message.state))
                return "state: integer expected";
        return null;
    };

    /**
     * Creates an InviteState message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof InviteState
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {InviteState} InviteState
     */
    InviteState.fromObject = function fromObject(object) {
        if (object instanceof $root.InviteState)
            return object;
        var message = new $root.InviteState();
        if (object.index != null)
            message.index = object.index | 0;
        if (object.state != null)
            message.state = object.state | 0;
        return message;
    };

    /**
     * Creates a plain object from an InviteState message. Also converts values to other types if specified.
     * @function toObject
     * @memberof InviteState
     * @static
     * @param {InviteState} message InviteState
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    InviteState.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.index = 0;
            object.state = 0;
        }
        if (message.index != null && message.hasOwnProperty("index"))
            object.index = message.index;
        if (message.state != null && message.hasOwnProperty("state"))
            object.state = message.state;
        return object;
    };

    /**
     * Converts this InviteState to JSON.
     * @function toJSON
     * @memberof InviteState
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    InviteState.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return InviteState;
})();

$root.FortuneWheelReq = (function() {

    /**
     * Properties of a FortuneWheelReq.
     * @exports IFortuneWheelReq
     * @interface IFortuneWheelReq
     * @property {number|null} [type] FortuneWheelReq type
     */

    /**
     * Constructs a new FortuneWheelReq.
     * @exports FortuneWheelReq
     * @classdesc Represents a FortuneWheelReq.
     * @implements IFortuneWheelReq
     * @constructor
     * @param {IFortuneWheelReq=} [properties] Properties to set
     */
    function FortuneWheelReq(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * FortuneWheelReq type.
     * @member {number} type
     * @memberof FortuneWheelReq
     * @instance
     */
    FortuneWheelReq.prototype.type = 0;

    /**
     * Creates a new FortuneWheelReq instance using the specified properties.
     * @function create
     * @memberof FortuneWheelReq
     * @static
     * @param {IFortuneWheelReq=} [properties] Properties to set
     * @returns {FortuneWheelReq} FortuneWheelReq instance
     */
    FortuneWheelReq.create = function create(properties) {
        return new FortuneWheelReq(properties);
    };

    /**
     * Encodes the specified FortuneWheelReq message. Does not implicitly {@link FortuneWheelReq.verify|verify} messages.
     * @function encode
     * @memberof FortuneWheelReq
     * @static
     * @param {IFortuneWheelReq} message FortuneWheelReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    FortuneWheelReq.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.type != null && message.hasOwnProperty("type"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
        return writer;
    };

    /**
     * Encodes the specified FortuneWheelReq message, length delimited. Does not implicitly {@link FortuneWheelReq.verify|verify} messages.
     * @function encodeDelimited
     * @memberof FortuneWheelReq
     * @static
     * @param {IFortuneWheelReq} message FortuneWheelReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    FortuneWheelReq.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a FortuneWheelReq message from the specified reader or buffer.
     * @function decode
     * @memberof FortuneWheelReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {FortuneWheelReq} FortuneWheelReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    FortuneWheelReq.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.FortuneWheelReq();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.type = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a FortuneWheelReq message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof FortuneWheelReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {FortuneWheelReq} FortuneWheelReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    FortuneWheelReq.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a FortuneWheelReq message.
     * @function verify
     * @memberof FortuneWheelReq
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    FortuneWheelReq.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.type != null && message.hasOwnProperty("type"))
            if (!$util.isInteger(message.type))
                return "type: integer expected";
        return null;
    };

    /**
     * Creates a FortuneWheelReq message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof FortuneWheelReq
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {FortuneWheelReq} FortuneWheelReq
     */
    FortuneWheelReq.fromObject = function fromObject(object) {
        if (object instanceof $root.FortuneWheelReq)
            return object;
        var message = new $root.FortuneWheelReq();
        if (object.type != null)
            message.type = object.type | 0;
        return message;
    };

    /**
     * Creates a plain object from a FortuneWheelReq message. Also converts values to other types if specified.
     * @function toObject
     * @memberof FortuneWheelReq
     * @static
     * @param {FortuneWheelReq} message FortuneWheelReq
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    FortuneWheelReq.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.type = 0;
        if (message.type != null && message.hasOwnProperty("type"))
            object.type = message.type;
        return object;
    };

    /**
     * Converts this FortuneWheelReq to JSON.
     * @function toJSON
     * @memberof FortuneWheelReq
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    FortuneWheelReq.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return FortuneWheelReq;
})();

$root.FortuneWheelRsp = (function() {

    /**
     * Properties of a FortuneWheelRsp.
     * @exports IFortuneWheelRsp
     * @interface IFortuneWheelRsp
     * @property {number|null} [code] FortuneWheelRsp code
     * @property {number|null} [errorCode] FortuneWheelRsp errorCode
     * @property {Array.<number>|null} [index] FortuneWheelRsp index
     */

    /**
     * Constructs a new FortuneWheelRsp.
     * @exports FortuneWheelRsp
     * @classdesc Represents a FortuneWheelRsp.
     * @implements IFortuneWheelRsp
     * @constructor
     * @param {IFortuneWheelRsp=} [properties] Properties to set
     */
    function FortuneWheelRsp(properties) {
        this.index = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * FortuneWheelRsp code.
     * @member {number} code
     * @memberof FortuneWheelRsp
     * @instance
     */
    FortuneWheelRsp.prototype.code = 0;

    /**
     * FortuneWheelRsp errorCode.
     * @member {number} errorCode
     * @memberof FortuneWheelRsp
     * @instance
     */
    FortuneWheelRsp.prototype.errorCode = 0;

    /**
     * FortuneWheelRsp index.
     * @member {Array.<number>} index
     * @memberof FortuneWheelRsp
     * @instance
     */
    FortuneWheelRsp.prototype.index = $util.emptyArray;

    /**
     * Creates a new FortuneWheelRsp instance using the specified properties.
     * @function create
     * @memberof FortuneWheelRsp
     * @static
     * @param {IFortuneWheelRsp=} [properties] Properties to set
     * @returns {FortuneWheelRsp} FortuneWheelRsp instance
     */
    FortuneWheelRsp.create = function create(properties) {
        return new FortuneWheelRsp(properties);
    };

    /**
     * Encodes the specified FortuneWheelRsp message. Does not implicitly {@link FortuneWheelRsp.verify|verify} messages.
     * @function encode
     * @memberof FortuneWheelRsp
     * @static
     * @param {IFortuneWheelRsp} message FortuneWheelRsp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    FortuneWheelRsp.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.code != null && message.hasOwnProperty("code"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
        if (message.errorCode != null && message.hasOwnProperty("errorCode"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.errorCode);
        if (message.index != null && message.index.length) {
            writer.uint32(/* id 3, wireType 2 =*/26).fork();
            for (var i = 0; i < message.index.length; ++i)
                writer.int32(message.index[i]);
            writer.ldelim();
        }
        return writer;
    };

    /**
     * Encodes the specified FortuneWheelRsp message, length delimited. Does not implicitly {@link FortuneWheelRsp.verify|verify} messages.
     * @function encodeDelimited
     * @memberof FortuneWheelRsp
     * @static
     * @param {IFortuneWheelRsp} message FortuneWheelRsp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    FortuneWheelRsp.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a FortuneWheelRsp message from the specified reader or buffer.
     * @function decode
     * @memberof FortuneWheelRsp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {FortuneWheelRsp} FortuneWheelRsp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    FortuneWheelRsp.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.FortuneWheelRsp();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.code = reader.int32();
                break;
            case 2:
                message.errorCode = reader.int32();
                break;
            case 3:
                if (!(message.index && message.index.length))
                    message.index = [];
                if ((tag & 7) === 2) {
                    var end2 = reader.uint32() + reader.pos;
                    while (reader.pos < end2)
                        message.index.push(reader.int32());
                } else
                    message.index.push(reader.int32());
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a FortuneWheelRsp message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof FortuneWheelRsp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {FortuneWheelRsp} FortuneWheelRsp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    FortuneWheelRsp.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a FortuneWheelRsp message.
     * @function verify
     * @memberof FortuneWheelRsp
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    FortuneWheelRsp.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.code != null && message.hasOwnProperty("code"))
            if (!$util.isInteger(message.code))
                return "code: integer expected";
        if (message.errorCode != null && message.hasOwnProperty("errorCode"))
            if (!$util.isInteger(message.errorCode))
                return "errorCode: integer expected";
        if (message.index != null && message.hasOwnProperty("index")) {
            if (!Array.isArray(message.index))
                return "index: array expected";
            for (var i = 0; i < message.index.length; ++i)
                if (!$util.isInteger(message.index[i]))
                    return "index: integer[] expected";
        }
        return null;
    };

    /**
     * Creates a FortuneWheelRsp message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof FortuneWheelRsp
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {FortuneWheelRsp} FortuneWheelRsp
     */
    FortuneWheelRsp.fromObject = function fromObject(object) {
        if (object instanceof $root.FortuneWheelRsp)
            return object;
        var message = new $root.FortuneWheelRsp();
        if (object.code != null)
            message.code = object.code | 0;
        if (object.errorCode != null)
            message.errorCode = object.errorCode | 0;
        if (object.index) {
            if (!Array.isArray(object.index))
                throw TypeError(".FortuneWheelRsp.index: array expected");
            message.index = [];
            for (var i = 0; i < object.index.length; ++i)
                message.index[i] = object.index[i] | 0;
        }
        return message;
    };

    /**
     * Creates a plain object from a FortuneWheelRsp message. Also converts values to other types if specified.
     * @function toObject
     * @memberof FortuneWheelRsp
     * @static
     * @param {FortuneWheelRsp} message FortuneWheelRsp
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    FortuneWheelRsp.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults)
            object.index = [];
        if (options.defaults) {
            object.code = 0;
            object.errorCode = 0;
        }
        if (message.code != null && message.hasOwnProperty("code"))
            object.code = message.code;
        if (message.errorCode != null && message.hasOwnProperty("errorCode"))
            object.errorCode = message.errorCode;
        if (message.index && message.index.length) {
            object.index = [];
            for (var j = 0; j < message.index.length; ++j)
                object.index[j] = message.index[j];
        }
        return object;
    };

    /**
     * Converts this FortuneWheelRsp to JSON.
     * @function toJSON
     * @memberof FortuneWheelRsp
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    FortuneWheelRsp.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return FortuneWheelRsp;
})();

$root.InviterNum = (function() {

    /**
     * Properties of an InviterNum.
     * @exports IInviterNum
     * @interface IInviterNum
     * @property {number|null} [invite] InviterNum invite
     */

    /**
     * Constructs a new InviterNum.
     * @exports InviterNum
     * @classdesc Represents an InviterNum.
     * @implements IInviterNum
     * @constructor
     * @param {IInviterNum=} [properties] Properties to set
     */
    function InviterNum(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * InviterNum invite.
     * @member {number} invite
     * @memberof InviterNum
     * @instance
     */
    InviterNum.prototype.invite = 0;

    /**
     * Creates a new InviterNum instance using the specified properties.
     * @function create
     * @memberof InviterNum
     * @static
     * @param {IInviterNum=} [properties] Properties to set
     * @returns {InviterNum} InviterNum instance
     */
    InviterNum.create = function create(properties) {
        return new InviterNum(properties);
    };

    /**
     * Encodes the specified InviterNum message. Does not implicitly {@link InviterNum.verify|verify} messages.
     * @function encode
     * @memberof InviterNum
     * @static
     * @param {IInviterNum} message InviterNum message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    InviterNum.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.invite != null && message.hasOwnProperty("invite"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.invite);
        return writer;
    };

    /**
     * Encodes the specified InviterNum message, length delimited. Does not implicitly {@link InviterNum.verify|verify} messages.
     * @function encodeDelimited
     * @memberof InviterNum
     * @static
     * @param {IInviterNum} message InviterNum message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    InviterNum.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an InviterNum message from the specified reader or buffer.
     * @function decode
     * @memberof InviterNum
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {InviterNum} InviterNum
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    InviterNum.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.InviterNum();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.invite = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an InviterNum message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof InviterNum
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {InviterNum} InviterNum
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    InviterNum.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an InviterNum message.
     * @function verify
     * @memberof InviterNum
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    InviterNum.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.invite != null && message.hasOwnProperty("invite"))
            if (!$util.isInteger(message.invite))
                return "invite: integer expected";
        return null;
    };

    /**
     * Creates an InviterNum message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof InviterNum
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {InviterNum} InviterNum
     */
    InviterNum.fromObject = function fromObject(object) {
        if (object instanceof $root.InviterNum)
            return object;
        var message = new $root.InviterNum();
        if (object.invite != null)
            message.invite = object.invite | 0;
        return message;
    };

    /**
     * Creates a plain object from an InviterNum message. Also converts values to other types if specified.
     * @function toObject
     * @memberof InviterNum
     * @static
     * @param {InviterNum} message InviterNum
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    InviterNum.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.invite = 0;
        if (message.invite != null && message.hasOwnProperty("invite"))
            object.invite = message.invite;
        return object;
    };

    /**
     * Converts this InviterNum to JSON.
     * @function toJSON
     * @memberof InviterNum
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    InviterNum.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return InviterNum;
})();

$root.AchievementReq = (function() {

    /**
     * Properties of an AchievementReq.
     * @exports IAchievementReq
     * @interface IAchievementReq
     * @property {number|null} [type] AchievementReq type
     */

    /**
     * Constructs a new AchievementReq.
     * @exports AchievementReq
     * @classdesc Represents an AchievementReq.
     * @implements IAchievementReq
     * @constructor
     * @param {IAchievementReq=} [properties] Properties to set
     */
    function AchievementReq(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * AchievementReq type.
     * @member {number} type
     * @memberof AchievementReq
     * @instance
     */
    AchievementReq.prototype.type = 0;

    /**
     * Creates a new AchievementReq instance using the specified properties.
     * @function create
     * @memberof AchievementReq
     * @static
     * @param {IAchievementReq=} [properties] Properties to set
     * @returns {AchievementReq} AchievementReq instance
     */
    AchievementReq.create = function create(properties) {
        return new AchievementReq(properties);
    };

    /**
     * Encodes the specified AchievementReq message. Does not implicitly {@link AchievementReq.verify|verify} messages.
     * @function encode
     * @memberof AchievementReq
     * @static
     * @param {IAchievementReq} message AchievementReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    AchievementReq.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.type != null && message.hasOwnProperty("type"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
        return writer;
    };

    /**
     * Encodes the specified AchievementReq message, length delimited. Does not implicitly {@link AchievementReq.verify|verify} messages.
     * @function encodeDelimited
     * @memberof AchievementReq
     * @static
     * @param {IAchievementReq} message AchievementReq message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    AchievementReq.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an AchievementReq message from the specified reader or buffer.
     * @function decode
     * @memberof AchievementReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {AchievementReq} AchievementReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    AchievementReq.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AchievementReq();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.type = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an AchievementReq message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof AchievementReq
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {AchievementReq} AchievementReq
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    AchievementReq.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an AchievementReq message.
     * @function verify
     * @memberof AchievementReq
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    AchievementReq.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.type != null && message.hasOwnProperty("type"))
            if (!$util.isInteger(message.type))
                return "type: integer expected";
        return null;
    };

    /**
     * Creates an AchievementReq message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof AchievementReq
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {AchievementReq} AchievementReq
     */
    AchievementReq.fromObject = function fromObject(object) {
        if (object instanceof $root.AchievementReq)
            return object;
        var message = new $root.AchievementReq();
        if (object.type != null)
            message.type = object.type | 0;
        return message;
    };

    /**
     * Creates a plain object from an AchievementReq message. Also converts values to other types if specified.
     * @function toObject
     * @memberof AchievementReq
     * @static
     * @param {AchievementReq} message AchievementReq
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    AchievementReq.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.type = 0;
        if (message.type != null && message.hasOwnProperty("type"))
            object.type = message.type;
        return object;
    };

    /**
     * Converts this AchievementReq to JSON.
     * @function toJSON
     * @memberof AchievementReq
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    AchievementReq.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return AchievementReq;
})();

$root.AchievementRsp = (function() {

    /**
     * Properties of an AchievementRsp.
     * @exports IAchievementRsp
     * @interface IAchievementRsp
     * @property {Array.<ITask>|null} [task] AchievementRsp task
     */

    /**
     * Constructs a new AchievementRsp.
     * @exports AchievementRsp
     * @classdesc Represents an AchievementRsp.
     * @implements IAchievementRsp
     * @constructor
     * @param {IAchievementRsp=} [properties] Properties to set
     */
    function AchievementRsp(properties) {
        this.task = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * AchievementRsp task.
     * @member {Array.<ITask>} task
     * @memberof AchievementRsp
     * @instance
     */
    AchievementRsp.prototype.task = $util.emptyArray;

    /**
     * Creates a new AchievementRsp instance using the specified properties.
     * @function create
     * @memberof AchievementRsp
     * @static
     * @param {IAchievementRsp=} [properties] Properties to set
     * @returns {AchievementRsp} AchievementRsp instance
     */
    AchievementRsp.create = function create(properties) {
        return new AchievementRsp(properties);
    };

    /**
     * Encodes the specified AchievementRsp message. Does not implicitly {@link AchievementRsp.verify|verify} messages.
     * @function encode
     * @memberof AchievementRsp
     * @static
     * @param {IAchievementRsp} message AchievementRsp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    AchievementRsp.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.task != null && message.task.length)
            for (var i = 0; i < message.task.length; ++i)
                $root.Task.encode(message.task[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
        return writer;
    };

    /**
     * Encodes the specified AchievementRsp message, length delimited. Does not implicitly {@link AchievementRsp.verify|verify} messages.
     * @function encodeDelimited
     * @memberof AchievementRsp
     * @static
     * @param {IAchievementRsp} message AchievementRsp message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    AchievementRsp.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes an AchievementRsp message from the specified reader or buffer.
     * @function decode
     * @memberof AchievementRsp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {AchievementRsp} AchievementRsp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    AchievementRsp.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AchievementRsp();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                if (!(message.task && message.task.length))
                    message.task = [];
                message.task.push($root.Task.decode(reader, reader.uint32()));
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes an AchievementRsp message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof AchievementRsp
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {AchievementRsp} AchievementRsp
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    AchievementRsp.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies an AchievementRsp message.
     * @function verify
     * @memberof AchievementRsp
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    AchievementRsp.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.task != null && message.hasOwnProperty("task")) {
            if (!Array.isArray(message.task))
                return "task: array expected";
            for (var i = 0; i < message.task.length; ++i) {
                var error = $root.Task.verify(message.task[i]);
                if (error)
                    return "task." + error;
            }
        }
        return null;
    };

    /**
     * Creates an AchievementRsp message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof AchievementRsp
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {AchievementRsp} AchievementRsp
     */
    AchievementRsp.fromObject = function fromObject(object) {
        if (object instanceof $root.AchievementRsp)
            return object;
        var message = new $root.AchievementRsp();
        if (object.task) {
            if (!Array.isArray(object.task))
                throw TypeError(".AchievementRsp.task: array expected");
            message.task = [];
            for (var i = 0; i < object.task.length; ++i) {
                if (typeof object.task[i] !== "object")
                    throw TypeError(".AchievementRsp.task: object expected");
                message.task[i] = $root.Task.fromObject(object.task[i]);
            }
        }
        return message;
    };

    /**
     * Creates a plain object from an AchievementRsp message. Also converts values to other types if specified.
     * @function toObject
     * @memberof AchievementRsp
     * @static
     * @param {AchievementRsp} message AchievementRsp
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    AchievementRsp.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults)
            object.task = [];
        if (message.task && message.task.length) {
            object.task = [];
            for (var j = 0; j < message.task.length; ++j)
                object.task[j] = $root.Task.toObject(message.task[j], options);
        }
        return object;
    };

    /**
     * Converts this AchievementRsp to JSON.
     * @function toJSON
     * @memberof AchievementRsp
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    AchievementRsp.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return AchievementRsp;
})();

$root.Task = (function() {

    /**
     * Properties of a Task.
     * @exports ITask
     * @interface ITask
     * @property {number|null} [taskid] Task taskid
     * @property {number|null} [count] Task count
     */

    /**
     * Constructs a new Task.
     * @exports Task
     * @classdesc Represents a Task.
     * @implements ITask
     * @constructor
     * @param {ITask=} [properties] Properties to set
     */
    function Task(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Task taskid.
     * @member {number} taskid
     * @memberof Task
     * @instance
     */
    Task.prototype.taskid = 0;

    /**
     * Task count.
     * @member {number} count
     * @memberof Task
     * @instance
     */
    Task.prototype.count = 0;

    /**
     * Creates a new Task instance using the specified properties.
     * @function create
     * @memberof Task
     * @static
     * @param {ITask=} [properties] Properties to set
     * @returns {Task} Task instance
     */
    Task.create = function create(properties) {
        return new Task(properties);
    };

    /**
     * Encodes the specified Task message. Does not implicitly {@link Task.verify|verify} messages.
     * @function encode
     * @memberof Task
     * @static
     * @param {ITask} message Task message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Task.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.taskid != null && message.hasOwnProperty("taskid"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.taskid);
        if (message.count != null && message.hasOwnProperty("count"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.count);
        return writer;
    };

    /**
     * Encodes the specified Task message, length delimited. Does not implicitly {@link Task.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Task
     * @static
     * @param {ITask} message Task message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Task.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a Task message from the specified reader or buffer.
     * @function decode
     * @memberof Task
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Task} Task
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Task.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Task();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.taskid = reader.int32();
                break;
            case 2:
                message.count = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a Task message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Task
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Task} Task
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Task.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a Task message.
     * @function verify
     * @memberof Task
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Task.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.taskid != null && message.hasOwnProperty("taskid"))
            if (!$util.isInteger(message.taskid))
                return "taskid: integer expected";
        if (message.count != null && message.hasOwnProperty("count"))
            if (!$util.isInteger(message.count))
                return "count: integer expected";
        return null;
    };

    /**
     * Creates a Task message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Task
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Task} Task
     */
    Task.fromObject = function fromObject(object) {
        if (object instanceof $root.Task)
            return object;
        var message = new $root.Task();
        if (object.taskid != null)
            message.taskid = object.taskid | 0;
        if (object.count != null)
            message.count = object.count | 0;
        return message;
    };

    /**
     * Creates a plain object from a Task message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Task
     * @static
     * @param {Task} message Task
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Task.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.taskid = 0;
            object.count = 0;
        }
        if (message.taskid != null && message.hasOwnProperty("taskid"))
            object.taskid = message.taskid;
        if (message.count != null && message.hasOwnProperty("count"))
            object.count = message.count;
        return object;
    };

    /**
     * Converts this Task to JSON.
     * @function toJSON
     * @memberof Task
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Task.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return Task;
})();

$root.RankInfo = (function() {

    /**
     * Properties of a RankInfo.
     * @exports IRankInfo
     * @interface IRankInfo
     * @property {number|null} [uid] RankInfo uid
     * @property {number|null} [score] RankInfo score
     * @property {string|null} [headUrl] RankInfo headUrl
     * @property {string|null} [nick] RankInfo nick
     */

    /**
     * Constructs a new RankInfo.
     * @exports RankInfo
     * @classdesc Represents a RankInfo.
     * @implements IRankInfo
     * @constructor
     * @param {IRankInfo=} [properties] Properties to set
     */
    function RankInfo(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * RankInfo uid.
     * @member {number} uid
     * @memberof RankInfo
     * @instance
     */
    RankInfo.prototype.uid = 0;

    /**
     * RankInfo score.
     * @member {number} score
     * @memberof RankInfo
     * @instance
     */
    RankInfo.prototype.score = 0;

    /**
     * RankInfo headUrl.
     * @member {string} headUrl
     * @memberof RankInfo
     * @instance
     */
    RankInfo.prototype.headUrl = "";

    /**
     * RankInfo nick.
     * @member {string} nick
     * @memberof RankInfo
     * @instance
     */
    RankInfo.prototype.nick = "";

    /**
     * Creates a new RankInfo instance using the specified properties.
     * @function create
     * @memberof RankInfo
     * @static
     * @param {IRankInfo=} [properties] Properties to set
     * @returns {RankInfo} RankInfo instance
     */
    RankInfo.create = function create(properties) {
        return new RankInfo(properties);
    };

    /**
     * Encodes the specified RankInfo message. Does not implicitly {@link RankInfo.verify|verify} messages.
     * @function encode
     * @memberof RankInfo
     * @static
     * @param {IRankInfo} message RankInfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RankInfo.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.uid != null && message.hasOwnProperty("uid"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.uid);
        if (message.score != null && message.hasOwnProperty("score"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.score);
        if (message.headUrl != null && message.hasOwnProperty("headUrl"))
            writer.uint32(/* id 3, wireType 2 =*/26).string(message.headUrl);
        if (message.nick != null && message.hasOwnProperty("nick"))
            writer.uint32(/* id 4, wireType 2 =*/34).string(message.nick);
        return writer;
    };

    /**
     * Encodes the specified RankInfo message, length delimited. Does not implicitly {@link RankInfo.verify|verify} messages.
     * @function encodeDelimited
     * @memberof RankInfo
     * @static
     * @param {IRankInfo} message RankInfo message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RankInfo.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a RankInfo message from the specified reader or buffer.
     * @function decode
     * @memberof RankInfo
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {RankInfo} RankInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RankInfo.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RankInfo();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.uid = reader.int32();
                break;
            case 2:
                message.score = reader.int32();
                break;
            case 3:
                message.headUrl = reader.string();
                break;
            case 4:
                message.nick = reader.string();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a RankInfo message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof RankInfo
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {RankInfo} RankInfo
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RankInfo.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a RankInfo message.
     * @function verify
     * @memberof RankInfo
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    RankInfo.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.uid != null && message.hasOwnProperty("uid"))
            if (!$util.isInteger(message.uid))
                return "uid: integer expected";
        if (message.score != null && message.hasOwnProperty("score"))
            if (!$util.isInteger(message.score))
                return "score: integer expected";
        if (message.headUrl != null && message.hasOwnProperty("headUrl"))
            if (!$util.isString(message.headUrl))
                return "headUrl: string expected";
        if (message.nick != null && message.hasOwnProperty("nick"))
            if (!$util.isString(message.nick))
                return "nick: string expected";
        return null;
    };

    /**
     * Creates a RankInfo message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof RankInfo
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {RankInfo} RankInfo
     */
    RankInfo.fromObject = function fromObject(object) {
        if (object instanceof $root.RankInfo)
            return object;
        var message = new $root.RankInfo();
        if (object.uid != null)
            message.uid = object.uid | 0;
        if (object.score != null)
            message.score = object.score | 0;
        if (object.headUrl != null)
            message.headUrl = String(object.headUrl);
        if (object.nick != null)
            message.nick = String(object.nick);
        return message;
    };

    /**
     * Creates a plain object from a RankInfo message. Also converts values to other types if specified.
     * @function toObject
     * @memberof RankInfo
     * @static
     * @param {RankInfo} message RankInfo
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    RankInfo.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.uid = 0;
            object.score = 0;
            object.headUrl = "";
            object.nick = "";
        }
        if (message.uid != null && message.hasOwnProperty("uid"))
            object.uid = message.uid;
        if (message.score != null && message.hasOwnProperty("score"))
            object.score = message.score;
        if (message.headUrl != null && message.hasOwnProperty("headUrl"))
            object.headUrl = message.headUrl;
        if (message.nick != null && message.hasOwnProperty("nick"))
            object.nick = message.nick;
        return object;
    };

    /**
     * Converts this RankInfo to JSON.
     * @function toJSON
     * @memberof RankInfo
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    RankInfo.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return RankInfo;
})();

$root.GroupRank = (function() {

    /**
     * Properties of a GroupRank.
     * @exports IGroupRank
     * @interface IGroupRank
     * @property {Array.<IRankInfo>|null} [info] GroupRank info
     */

    /**
     * Constructs a new GroupRank.
     * @exports GroupRank
     * @classdesc Represents a GroupRank.
     * @implements IGroupRank
     * @constructor
     * @param {IGroupRank=} [properties] Properties to set
     */
    function GroupRank(properties) {
        this.info = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * GroupRank info.
     * @member {Array.<IRankInfo>} info
     * @memberof GroupRank
     * @instance
     */
    GroupRank.prototype.info = $util.emptyArray;

    /**
     * Creates a new GroupRank instance using the specified properties.
     * @function create
     * @memberof GroupRank
     * @static
     * @param {IGroupRank=} [properties] Properties to set
     * @returns {GroupRank} GroupRank instance
     */
    GroupRank.create = function create(properties) {
        return new GroupRank(properties);
    };

    /**
     * Encodes the specified GroupRank message. Does not implicitly {@link GroupRank.verify|verify} messages.
     * @function encode
     * @memberof GroupRank
     * @static
     * @param {IGroupRank} message GroupRank message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    GroupRank.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.info != null && message.info.length)
            for (var i = 0; i < message.info.length; ++i)
                $root.RankInfo.encode(message.info[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
        return writer;
    };

    /**
     * Encodes the specified GroupRank message, length delimited. Does not implicitly {@link GroupRank.verify|verify} messages.
     * @function encodeDelimited
     * @memberof GroupRank
     * @static
     * @param {IGroupRank} message GroupRank message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    GroupRank.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a GroupRank message from the specified reader or buffer.
     * @function decode
     * @memberof GroupRank
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {GroupRank} GroupRank
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    GroupRank.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.GroupRank();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                if (!(message.info && message.info.length))
                    message.info = [];
                message.info.push($root.RankInfo.decode(reader, reader.uint32()));
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a GroupRank message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof GroupRank
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {GroupRank} GroupRank
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    GroupRank.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a GroupRank message.
     * @function verify
     * @memberof GroupRank
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    GroupRank.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.info != null && message.hasOwnProperty("info")) {
            if (!Array.isArray(message.info))
                return "info: array expected";
            for (var i = 0; i < message.info.length; ++i) {
                var error = $root.RankInfo.verify(message.info[i]);
                if (error)
                    return "info." + error;
            }
        }
        return null;
    };

    /**
     * Creates a GroupRank message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof GroupRank
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {GroupRank} GroupRank
     */
    GroupRank.fromObject = function fromObject(object) {
        if (object instanceof $root.GroupRank)
            return object;
        var message = new $root.GroupRank();
        if (object.info) {
            if (!Array.isArray(object.info))
                throw TypeError(".GroupRank.info: array expected");
            message.info = [];
            for (var i = 0; i < object.info.length; ++i) {
                if (typeof object.info[i] !== "object")
                    throw TypeError(".GroupRank.info: object expected");
                message.info[i] = $root.RankInfo.fromObject(object.info[i]);
            }
        }
        return message;
    };

    /**
     * Creates a plain object from a GroupRank message. Also converts values to other types if specified.
     * @function toObject
     * @memberof GroupRank
     * @static
     * @param {GroupRank} message GroupRank
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    GroupRank.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults)
            object.info = [];
        if (message.info && message.info.length) {
            object.info = [];
            for (var j = 0; j < message.info.length; ++j)
                object.info[j] = $root.RankInfo.toObject(message.info[j], options);
        }
        return object;
    };

    /**
     * Converts this GroupRank to JSON.
     * @function toJSON
     * @memberof GroupRank
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    GroupRank.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return GroupRank;
})();

$root.Pay = (function() {

    /**
     * Properties of a Pay.
     * @exports IPay
     * @interface IPay
     * @property {number|null} [id] Pay id
     */

    /**
     * Constructs a new Pay.
     * @exports Pay
     * @classdesc Represents a Pay.
     * @implements IPay
     * @constructor
     * @param {IPay=} [properties] Properties to set
     */
    function Pay(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Pay id.
     * @member {number} id
     * @memberof Pay
     * @instance
     */
    Pay.prototype.id = 0;

    /**
     * Creates a new Pay instance using the specified properties.
     * @function create
     * @memberof Pay
     * @static
     * @param {IPay=} [properties] Properties to set
     * @returns {Pay} Pay instance
     */
    Pay.create = function create(properties) {
        return new Pay(properties);
    };

    /**
     * Encodes the specified Pay message. Does not implicitly {@link Pay.verify|verify} messages.
     * @function encode
     * @memberof Pay
     * @static
     * @param {IPay} message Pay message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Pay.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.id != null && message.hasOwnProperty("id"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
        return writer;
    };

    /**
     * Encodes the specified Pay message, length delimited. Does not implicitly {@link Pay.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Pay
     * @static
     * @param {IPay} message Pay message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Pay.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a Pay message from the specified reader or buffer.
     * @function decode
     * @memberof Pay
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Pay} Pay
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Pay.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Pay();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.id = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a Pay message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Pay
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Pay} Pay
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Pay.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a Pay message.
     * @function verify
     * @memberof Pay
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Pay.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.id != null && message.hasOwnProperty("id"))
            if (!$util.isInteger(message.id))
                return "id: integer expected";
        return null;
    };

    /**
     * Creates a Pay message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Pay
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Pay} Pay
     */
    Pay.fromObject = function fromObject(object) {
        if (object instanceof $root.Pay)
            return object;
        var message = new $root.Pay();
        if (object.id != null)
            message.id = object.id | 0;
        return message;
    };

    /**
     * Creates a plain object from a Pay message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Pay
     * @static
     * @param {Pay} message Pay
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Pay.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.id = 0;
        if (message.id != null && message.hasOwnProperty("id"))
            object.id = message.id;
        return object;
    };

    /**
     * Converts this Pay to JSON.
     * @function toJSON
     * @memberof Pay
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Pay.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return Pay;
})();

$root.PayData = (function() {

    /**
     * Properties of a PayData.
     * @exports IPayData
     * @interface IPayData
     * @property {string|null} [appId] PayData appId
     * @property {number|null} [accountId] PayData accountId
     * @property {number|null} [amount] PayData amount
     * @property {string|null} [wxopenid] PayData wxopenid
     * @property {string|null} [cpOrderId] PayData cpOrderId
     * @property {string|null} [callBackUrl] PayData callBackUrl
     * @property {string|null} [merchantUrl] PayData merchantUrl
     * @property {string|null} [subject] PayData subject
     * @property {number|null} [channel] PayData channel
     * @property {number|null} [timestamp] PayData timestamp
     * @property {string|null} [sign] PayData sign
     */

    /**
     * Constructs a new PayData.
     * @exports PayData
     * @classdesc Represents a PayData.
     * @implements IPayData
     * @constructor
     * @param {IPayData=} [properties] Properties to set
     */
    function PayData(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * PayData appId.
     * @member {string} appId
     * @memberof PayData
     * @instance
     */
    PayData.prototype.appId = "";

    /**
     * PayData accountId.
     * @member {number} accountId
     * @memberof PayData
     * @instance
     */
    PayData.prototype.accountId = 0;

    /**
     * PayData amount.
     * @member {number} amount
     * @memberof PayData
     * @instance
     */
    PayData.prototype.amount = 0;

    /**
     * PayData wxopenid.
     * @member {string} wxopenid
     * @memberof PayData
     * @instance
     */
    PayData.prototype.wxopenid = "";

    /**
     * PayData cpOrderId.
     * @member {string} cpOrderId
     * @memberof PayData
     * @instance
     */
    PayData.prototype.cpOrderId = "";

    /**
     * PayData callBackUrl.
     * @member {string} callBackUrl
     * @memberof PayData
     * @instance
     */
    PayData.prototype.callBackUrl = "";

    /**
     * PayData merchantUrl.
     * @member {string} merchantUrl
     * @memberof PayData
     * @instance
     */
    PayData.prototype.merchantUrl = "";

    /**
     * PayData subject.
     * @member {string} subject
     * @memberof PayData
     * @instance
     */
    PayData.prototype.subject = "";

    /**
     * PayData channel.
     * @member {number} channel
     * @memberof PayData
     * @instance
     */
    PayData.prototype.channel = 0;

    /**
     * PayData timestamp.
     * @member {number} timestamp
     * @memberof PayData
     * @instance
     */
    PayData.prototype.timestamp = 0;

    /**
     * PayData sign.
     * @member {string} sign
     * @memberof PayData
     * @instance
     */
    PayData.prototype.sign = "";

    /**
     * Creates a new PayData instance using the specified properties.
     * @function create
     * @memberof PayData
     * @static
     * @param {IPayData=} [properties] Properties to set
     * @returns {PayData} PayData instance
     */
    PayData.create = function create(properties) {
        return new PayData(properties);
    };

    /**
     * Encodes the specified PayData message. Does not implicitly {@link PayData.verify|verify} messages.
     * @function encode
     * @memberof PayData
     * @static
     * @param {IPayData} message PayData message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    PayData.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.appId != null && message.hasOwnProperty("appId"))
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.appId);
        if (message.accountId != null && message.hasOwnProperty("accountId"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.accountId);
        if (message.amount != null && message.hasOwnProperty("amount"))
            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.amount);
        if (message.wxopenid != null && message.hasOwnProperty("wxopenid"))
            writer.uint32(/* id 4, wireType 2 =*/34).string(message.wxopenid);
        if (message.cpOrderId != null && message.hasOwnProperty("cpOrderId"))
            writer.uint32(/* id 5, wireType 2 =*/42).string(message.cpOrderId);
        if (message.callBackUrl != null && message.hasOwnProperty("callBackUrl"))
            writer.uint32(/* id 6, wireType 2 =*/50).string(message.callBackUrl);
        if (message.merchantUrl != null && message.hasOwnProperty("merchantUrl"))
            writer.uint32(/* id 7, wireType 2 =*/58).string(message.merchantUrl);
        if (message.subject != null && message.hasOwnProperty("subject"))
            writer.uint32(/* id 8, wireType 2 =*/66).string(message.subject);
        if (message.channel != null && message.hasOwnProperty("channel"))
            writer.uint32(/* id 9, wireType 0 =*/72).int32(message.channel);
        if (message.timestamp != null && message.hasOwnProperty("timestamp"))
            writer.uint32(/* id 10, wireType 0 =*/80).int32(message.timestamp);
        if (message.sign != null && message.hasOwnProperty("sign"))
            writer.uint32(/* id 11, wireType 2 =*/90).string(message.sign);
        return writer;
    };

    /**
     * Encodes the specified PayData message, length delimited. Does not implicitly {@link PayData.verify|verify} messages.
     * @function encodeDelimited
     * @memberof PayData
     * @static
     * @param {IPayData} message PayData message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    PayData.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a PayData message from the specified reader or buffer.
     * @function decode
     * @memberof PayData
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {PayData} PayData
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    PayData.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.PayData();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.appId = reader.string();
                break;
            case 2:
                message.accountId = reader.int32();
                break;
            case 3:
                message.amount = reader.int32();
                break;
            case 4:
                message.wxopenid = reader.string();
                break;
            case 5:
                message.cpOrderId = reader.string();
                break;
            case 6:
                message.callBackUrl = reader.string();
                break;
            case 7:
                message.merchantUrl = reader.string();
                break;
            case 8:
                message.subject = reader.string();
                break;
            case 9:
                message.channel = reader.int32();
                break;
            case 10:
                message.timestamp = reader.int32();
                break;
            case 11:
                message.sign = reader.string();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a PayData message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof PayData
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {PayData} PayData
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    PayData.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a PayData message.
     * @function verify
     * @memberof PayData
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    PayData.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.appId != null && message.hasOwnProperty("appId"))
            if (!$util.isString(message.appId))
                return "appId: string expected";
        if (message.accountId != null && message.hasOwnProperty("accountId"))
            if (!$util.isInteger(message.accountId))
                return "accountId: integer expected";
        if (message.amount != null && message.hasOwnProperty("amount"))
            if (!$util.isInteger(message.amount))
                return "amount: integer expected";
        if (message.wxopenid != null && message.hasOwnProperty("wxopenid"))
            if (!$util.isString(message.wxopenid))
                return "wxopenid: string expected";
        if (message.cpOrderId != null && message.hasOwnProperty("cpOrderId"))
            if (!$util.isString(message.cpOrderId))
                return "cpOrderId: string expected";
        if (message.callBackUrl != null && message.hasOwnProperty("callBackUrl"))
            if (!$util.isString(message.callBackUrl))
                return "callBackUrl: string expected";
        if (message.merchantUrl != null && message.hasOwnProperty("merchantUrl"))
            if (!$util.isString(message.merchantUrl))
                return "merchantUrl: string expected";
        if (message.subject != null && message.hasOwnProperty("subject"))
            if (!$util.isString(message.subject))
                return "subject: string expected";
        if (message.channel != null && message.hasOwnProperty("channel"))
            if (!$util.isInteger(message.channel))
                return "channel: integer expected";
        if (message.timestamp != null && message.hasOwnProperty("timestamp"))
            if (!$util.isInteger(message.timestamp))
                return "timestamp: integer expected";
        if (message.sign != null && message.hasOwnProperty("sign"))
            if (!$util.isString(message.sign))
                return "sign: string expected";
        return null;
    };

    /**
     * Creates a PayData message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof PayData
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {PayData} PayData
     */
    PayData.fromObject = function fromObject(object) {
        if (object instanceof $root.PayData)
            return object;
        var message = new $root.PayData();
        if (object.appId != null)
            message.appId = String(object.appId);
        if (object.accountId != null)
            message.accountId = object.accountId | 0;
        if (object.amount != null)
            message.amount = object.amount | 0;
        if (object.wxopenid != null)
            message.wxopenid = String(object.wxopenid);
        if (object.cpOrderId != null)
            message.cpOrderId = String(object.cpOrderId);
        if (object.callBackUrl != null)
            message.callBackUrl = String(object.callBackUrl);
        if (object.merchantUrl != null)
            message.merchantUrl = String(object.merchantUrl);
        if (object.subject != null)
            message.subject = String(object.subject);
        if (object.channel != null)
            message.channel = object.channel | 0;
        if (object.timestamp != null)
            message.timestamp = object.timestamp | 0;
        if (object.sign != null)
            message.sign = String(object.sign);
        return message;
    };

    /**
     * Creates a plain object from a PayData message. Also converts values to other types if specified.
     * @function toObject
     * @memberof PayData
     * @static
     * @param {PayData} message PayData
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    PayData.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.appId = "";
            object.accountId = 0;
            object.amount = 0;
            object.wxopenid = "";
            object.cpOrderId = "";
            object.callBackUrl = "";
            object.merchantUrl = "";
            object.subject = "";
            object.channel = 0;
            object.timestamp = 0;
            object.sign = "";
        }
        if (message.appId != null && message.hasOwnProperty("appId"))
            object.appId = message.appId;
        if (message.accountId != null && message.hasOwnProperty("accountId"))
            object.accountId = message.accountId;
        if (message.amount != null && message.hasOwnProperty("amount"))
            object.amount = message.amount;
        if (message.wxopenid != null && message.hasOwnProperty("wxopenid"))
            object.wxopenid = message.wxopenid;
        if (message.cpOrderId != null && message.hasOwnProperty("cpOrderId"))
            object.cpOrderId = message.cpOrderId;
        if (message.callBackUrl != null && message.hasOwnProperty("callBackUrl"))
            object.callBackUrl = message.callBackUrl;
        if (message.merchantUrl != null && message.hasOwnProperty("merchantUrl"))
            object.merchantUrl = message.merchantUrl;
        if (message.subject != null && message.hasOwnProperty("subject"))
            object.subject = message.subject;
        if (message.channel != null && message.hasOwnProperty("channel"))
            object.channel = message.channel;
        if (message.timestamp != null && message.hasOwnProperty("timestamp"))
            object.timestamp = message.timestamp;
        if (message.sign != null && message.hasOwnProperty("sign"))
            object.sign = message.sign;
        return object;
    };

    /**
     * Converts this PayData to JSON.
     * @function toJSON
     * @memberof PayData
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    PayData.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return PayData;
})();

/**
 * CommandProtocol enum.
 * @exports CommandProtocol
 * @enum {string}
 * @property {number} KEEP_ALIVE=0 KEEP_ALIVE value
 * @property {number} SWITCH=998 SWITCH value
 * @property {number} USER_GAME_INFO=199 USER_GAME_INFO value
 * @property {number} USER_ACK=200 USER_ACK value
 * @property {number} SIGN=201 SIGN value
 * @property {number} CommonResult_ACK=202 CommonResult_ACK value
 * @property {number} ROOKIE_GIFT=203 ROOKIE_GIFT value
 * @property {number} SEVEN_LOGIN=205 SEVEN_LOGIN value
 * @property {number} MERGE=207 MERGE value
 * @property {number} ITEM_OP=209 ITEM_OP value
 * @property {number} ItemOp_Ack=210 ItemOp_Ack value
 * @property {number} CHANGE_SKIN=211 CHANGE_SKIN value
 * @property {number} GAME_END=213 GAME_END value
 * @property {number} GM=215 GM value
 * @property {number} BUY_REQ=217 BUY_REQ value
 * @property {number} INVITER_NUM=218 INVITER_NUM value
 * @property {number} SHARE=219 SHARE value
 * @property {number} EveryDayGift_RSP=220 EveryDayGift_RSP value
 * @property {number} EveryDayGift_REQ=221 EveryDayGift_REQ value
 * @property {number} RookieGuide_REQ=223 RookieGuide_REQ value
 * @property {number} TurnTable_REQ=225 TurnTable_REQ value
 * @property {number} TurnTable_RSP=226 TurnTable_RSP value
 * @property {number} InviteState_Req=227 InviteState_Req value
 * @property {number} InviteState_Rsp=228 InviteState_Rsp value
 * @property {number} Achievement_Req=229 Achievement_Req value
 * @property {number} Achievement_Rsp=230 Achievement_Rsp value
 * @property {number} Rank_Req=231 Rank_Req value
 * @property {number} Rank_Rsp=232 Rank_Rsp value
 * @property {number} Pay_Req=255 Pay_Req value
 * @property {number} Pay_Data=256 Pay_Data value
 */
$root.CommandProtocol = (function() {
    var valuesById = {}, values = Object.create(valuesById);
    values[valuesById[0] = "KEEP_ALIVE"] = 0;
    values[valuesById[998] = "SWITCH"] = 998;
    values[valuesById[199] = "USER_GAME_INFO"] = 199;
    values[valuesById[200] = "USER_ACK"] = 200;
    values[valuesById[201] = "SIGN"] = 201;
    values[valuesById[202] = "CommonResult_ACK"] = 202;
    values[valuesById[203] = "ROOKIE_GIFT"] = 203;
    values[valuesById[205] = "SEVEN_LOGIN"] = 205;
    values[valuesById[207] = "MERGE"] = 207;
    values[valuesById[209] = "ITEM_OP"] = 209;
    values[valuesById[210] = "ItemOp_Ack"] = 210;
    values[valuesById[211] = "CHANGE_SKIN"] = 211;
    values[valuesById[213] = "GAME_END"] = 213;
    values[valuesById[215] = "GM"] = 215;
    values[valuesById[217] = "BUY_REQ"] = 217;
    values[valuesById[218] = "INVITER_NUM"] = 218;
    values[valuesById[219] = "SHARE"] = 219;
    values[valuesById[220] = "EveryDayGift_RSP"] = 220;
    values[valuesById[221] = "EveryDayGift_REQ"] = 221;
    values[valuesById[223] = "RookieGuide_REQ"] = 223;
    values[valuesById[225] = "TurnTable_REQ"] = 225;
    values[valuesById[226] = "TurnTable_RSP"] = 226;
    values[valuesById[227] = "InviteState_Req"] = 227;
    values[valuesById[228] = "InviteState_Rsp"] = 228;
    values[valuesById[229] = "Achievement_Req"] = 229;
    values[valuesById[230] = "Achievement_Rsp"] = 230;
    values[valuesById[231] = "Rank_Req"] = 231;
    values[valuesById[232] = "Rank_Rsp"] = 232;
    values[valuesById[255] = "Pay_Req"] = 255;
    values[valuesById[256] = "Pay_Data"] = 256;
    return values;
})();

/**
 * TaskType enum.
 * @exports TaskType
 * @enum {string}
 * @property {number} UNKNOWN=0 UNKNOWN value
 * @property {number} SIGNIN=1 SIGNIN value
 * @property {number} INVITE=2 INVITE value
 * @property {number} ACHIEVEMENT=3 ACHIEVEMENT value
 * @property {number} MUTUAL_OPEN_BOX=4 MUTUAL_OPEN_BOX value
 */
$root.TaskType = (function() {
    var valuesById = {}, values = Object.create(valuesById);
    values[valuesById[0] = "UNKNOWN"] = 0;
    values[valuesById[1] = "SIGNIN"] = 1;
    values[valuesById[2] = "INVITE"] = 2;
    values[valuesById[3] = "ACHIEVEMENT"] = 3;
    values[valuesById[4] = "MUTUAL_OPEN_BOX"] = 4;
    return values;
})();

$root.Df = (function() {

    /**
     * Properties of a Df.
     * @exports IDf
     * @interface IDf
     * @property {number|null} [x] Df x
     * @property {number|null} [y] Df y
     * @property {number|null} [id] Df id
     */

    /**
     * Constructs a new Df.
     * @exports Df
     * @classdesc Represents a Df.
     * @implements IDf
     * @constructor
     * @param {IDf=} [properties] Properties to set
     */
    function Df(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Df x.
     * @member {number} x
     * @memberof Df
     * @instance
     */
    Df.prototype.x = 0;

    /**
     * Df y.
     * @member {number} y
     * @memberof Df
     * @instance
     */
    Df.prototype.y = 0;

    /**
     * Df id.
     * @member {number} id
     * @memberof Df
     * @instance
     */
    Df.prototype.id = 0;

    /**
     * Creates a new Df instance using the specified properties.
     * @function create
     * @memberof Df
     * @static
     * @param {IDf=} [properties] Properties to set
     * @returns {Df} Df instance
     */
    Df.create = function create(properties) {
        return new Df(properties);
    };

    /**
     * Encodes the specified Df message. Does not implicitly {@link Df.verify|verify} messages.
     * @function encode
     * @memberof Df
     * @static
     * @param {IDf} message Df message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Df.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.x != null && message.hasOwnProperty("x"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x);
        if (message.y != null && message.hasOwnProperty("y"))
            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y);
        if (message.id != null && message.hasOwnProperty("id"))
            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.id);
        return writer;
    };

    /**
     * Encodes the specified Df message, length delimited. Does not implicitly {@link Df.verify|verify} messages.
     * @function encodeDelimited
     * @memberof Df
     * @static
     * @param {IDf} message Df message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    Df.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a Df message from the specified reader or buffer.
     * @function decode
     * @memberof Df
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {Df} Df
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Df.decode = function decode(reader, length) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.Df();
        while (reader.pos < end) {
            var tag = reader.uint32();
            switch (tag >>> 3) {
            case 1:
                message.x = reader.int32();
                break;
            case 2:
                message.y = reader.int32();
                break;
            case 3:
                message.id = reader.int32();
                break;
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a Df message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof Df
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {Df} Df
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    Df.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a Df message.
     * @function verify
     * @memberof Df
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    Df.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.x != null && message.hasOwnProperty("x"))
            if (!$util.isInteger(message.x))
                return "x: integer expected";
        if (message.y != null && message.hasOwnProperty("y"))
            if (!$util.isInteger(message.y))
                return "y: integer expected";
        if (message.id != null && message.hasOwnProperty("id"))
            if (!$util.isInteger(message.id))
                return "id: integer expected";
        return null;
    };

    /**
     * Creates a Df message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof Df
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {Df} Df
     */
    Df.fromObject = function fromObject(object) {
        if (object instanceof $root.Df)
            return object;
        var message = new $root.Df();
        if (object.x != null)
            message.x = object.x | 0;
        if (object.y != null)
            message.y = object.y | 0;
        if (object.id != null)
            message.id = object.id | 0;
        return message;
    };

    /**
     * Creates a plain object from a Df message. Also converts values to other types if specified.
     * @function toObject
     * @memberof Df
     * @static
     * @param {Df} message Df
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    Df.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.x = 0;
            object.y = 0;
            object.id = 0;
        }
        if (message.x != null && message.hasOwnProperty("x"))
            object.x = message.x;
        if (message.y != null && message.hasOwnProperty("y"))
            object.y = message.y;
        if (message.id != null && message.hasOwnProperty("id"))
            object.id = message.id;
        return object;
    };

    /**
     * Converts this Df to JSON.
     * @function toJSON
     * @memberof Df
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    Df.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    return Df;
})();

module.exports = $root;
